public getControlType ( ) : csRptControlType | ||
Résultat | csRptControlType |
private void pSetNewControlPosition(cReportControl ctrl, float left, float top) { cReportAspect aspect = ctrl.getLabel().getAspect(); aspect.setLeft(left); aspect.setTop(top); cReportPaintObject paintObj = null; csRptPaintObjType paintType = csRptPaintObjType.CSRPTPAINTOBJBOX; if (ctrl.getControlType() == csRptControlType.CSRPTCTIMAGE || ctrl.getControlType() == csRptControlType.CSRPTCTCHART) { paintType = CSReportPaint.csRptPaintObjType.CSRPTPAINTOBJIMAGE; } paintObj = m_paint.getNewObject(paintType); aspect = ctrl.getLabel().getAspect(); pCopyAspectToPaint(aspect, paintObj.getAspect()); aspect.setLeft(left); aspect.setTop(top); paintObj.setText(ctrl.getLabel().getText()); paintObj.setRptType(csRptTypeSection.CONTROL); paintObj.setTag(ctrl.getKey()); ctrl.setKeyPaint(paintObj.getKey()); // position the control in the desired section line // moveControl(paintObj.getKey()); m_paint.drawObject(paintObj.getKey(), m_graphic); }
private void pCopyControl(cReportControl fromCtrl, cReportControl toCtrl) { toCtrl.setControlType(fromCtrl.getControlType()); cReportField field = toCtrl.getField(); field.setFieldType(fromCtrl.getField().getFieldType()); field.setIndex(fromCtrl.getField().getIndex()); field.setName(fromCtrl.getField().getName()); toCtrl.getFormulaHide().setName(fromCtrl.getFormulaHide().getName()); toCtrl.getFormulaHide().setText(fromCtrl.getFormulaHide().getText()); toCtrl.getFormulaValue().setName(fromCtrl.getFormulaValue().getName()); toCtrl.getFormulaValue().setText(fromCtrl.getFormulaValue().getText()); toCtrl.setHasFormulaHide(fromCtrl.getHasFormulaHide()); toCtrl.setHasFormulaValue(fromCtrl.getHasFormulaValue()); pCopyAspect(fromCtrl.getImage().getAspect(), toCtrl.getImage().getAspect()); cReportLabel label = toCtrl.getLabel(); pCopyAspect(fromCtrl.getLabel().getAspect(), label.getAspect()); label.setCanGrow(fromCtrl.getLabel().getCanGrow()); label.setText(fromCtrl.getLabel().getText()); pCopyAspect(fromCtrl.getLine().getAspect(), toCtrl.getLine().getAspect()); pCopyChart(fromCtrl.getChart(), toCtrl.getChart()); }