public void refresh() { super.refresh(); for (int index = 0; index < mContainer.count(); index++) { GUIComponent cmp = mContainer.get(index); if (GUIContainer.class.isInstance(cmp) && PrintPanelObject.class.isInstance(((GUIContainer) cmp).getObject())) { PrintPanelObject current_obj = (PrintPanelObject) ((GUIContainer) cmp).getObject(); current_obj.refresh(); } } }
public void setSizeEchelle(int echelle) { super.setSizeEchelle(echelle); double width = 0; double height = 0; switch (mPrintType) { case CENTER: width = mPrintPage.page_width - mPrintPage.margin_left - mPrintPage.margin_right - mPrintPage.left.extent - mPrintPage.rigth.extent; height = mPrintPage.page_height - mPrintPage.margin_top - mPrintPage.margin_bottom - mPrintPage.header.extent - mPrintPage.bottom.extent; break; case NORTH: width = mPrintPage.page_width - mPrintPage.margin_left - mPrintPage.margin_right; height = mPrintPage.header.extent; break; case SOUTH: width = mPrintPage.page_width - mPrintPage.margin_left - mPrintPage.margin_right; height = mPrintPage.bottom.extent; break; case EAST: width = mPrintPage.rigth.extent; height = mPrintPage.page_height - mPrintPage.margin_top - mPrintPage.margin_bottom - mPrintPage.header.extent - mPrintPage.bottom.extent; break; case WEST: width = mPrintPage.left.extent; height = mPrintPage.page_height - mPrintPage.margin_top - mPrintPage.margin_bottom - mPrintPage.header.extent - mPrintPage.bottom.extent; break; case PAGE: mContainer.setBorder( (int) (mPrintPage.margin_top * echelle / Ratio), (int) (mPrintPage.margin_left * echelle / Ratio), (int) (mPrintPage.margin_bottom * echelle / Ratio), (int) (mPrintPage.margin_right * echelle / Ratio), 0xFFFFFF); width = mPrintPage.page_width; height = mPrintPage.page_height; break; default: // TODO: Implement 'default' statement break; } mContainer.setSize((int) (width * echelle / Ratio), (int) (height * echelle / Ratio)); mContainer.setMinimumSize((int) (width * echelle / Ratio), (int) (height * echelle / Ratio)); mContainer.setMaximumSize((int) (width * echelle / Ratio), (int) (height * echelle / Ratio)); for (int index = 0; index < mContainer.count(); index++) { GUIComponent cmp = mContainer.get(index); if (GUIContainer.class.isInstance(cmp) && PrintPanelObject.class.isInstance(((GUIContainer) cmp).getObject())) { PrintPanelObject current_obj = (PrintPanelObject) ((GUIContainer) cmp).getObject(); current_obj.setSizeEchelle(echelle); } } }