public ControlRow(int _index, int _iCompPosY) { String slabelname = getColumnName(_index); String stextfieldname = getTitleName(_index); CurUnoDialog.insertControlModel( "com.sun.star.awt.UnoControlFixedTextModel", slabelname, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { 16, Boolean.TRUE, new Integer(iLabelPosX), new Integer(_iCompPosY + 1), UIConsts.INVISIBLESTEP, new Short(curtabindex++), 30 }); xTextComponent = CurUnoDialog.insertTextField( stextfieldname, 0, null, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { 12, HelpIds.getHelpIdString(curHelpIndex++), new Integer(iLabelPosX + 30), new Integer(_iCompPosY), UIConsts.INVISIBLESTEP, new Short(curtabindex++), new Integer(iCompWidth - 90 - 20) }); }
public String getFieldNameByTitleControl(Object _fieldtitlemodel) { String sTitleModelName = (String) Helper.getUnoPropertyValue(_fieldtitlemodel, PropertyNames.PROPERTY_NAME); String sindex = JavaTools.getSuffixNumber(sTitleModelName); return (String) CurUnoDialog.getControlProperty(this.SOLABELPREFIX + sindex, PropertyNames.PROPERTY_LABEL); }
public TitlesComponent( WizardDialog _CurUnoDialog, int _iStep, int _iCompPosX, int _iCompPosY, int _iCompWidth, int _uitextfieldcount, String _slblColumnNames, String _slblColumnTitles, int _firsthelpindex) { super( _CurUnoDialog, null, _iStep, _iCompPosX, _iCompPosY, _iCompWidth, _uitextfieldcount, 18, _firsthelpindex); CurUnoDialog.insertControlModel( "com.sun.star.awt.UnoControlFixedTextModel", "lblColumnNames", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { 8, _slblColumnNames, new Integer(iLabelPosX), new Integer(iCompPosY - 10), IStep, 60 }); CurUnoDialog.insertControlModel( "com.sun.star.awt.UnoControlFixedTextModel", "lblColumnTitles", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] {8, _slblColumnTitles, 90, new Integer(iCompPosY - 10), IStep, 152}); }
private void adjustPosSizes() { String sLongestFieldName = JavaTools.getlongestArrayItem(fieldnames); Size aSize = CurUnoDialog.getpreferredLabelSize(getColumnName(0), sLongestFieldName); double dblMAPConversion = CurUnoDialog.getMAPConversionFactor(getColumnName(0)); int iFieldNameWidth = getFieldNameWidth(aSize.Width, dblMAPConversion) + 10; Integer FieldNameWidth = new Integer(iFieldNameWidth); Integer TitlePosX = new Integer(iLabelPosX + iFieldNameWidth + 2); Integer TitleWidth = new Integer(iCompPosX + iCompWidth - TitlePosX.intValue() - iScrollBarWidth - 6); for (short i = 0; i <= ncurfieldcount; i++) { CurUnoDialog.setControlProperty( getColumnName(i), PropertyNames.PROPERTY_WIDTH, FieldNameWidth); CurUnoDialog.setControlProperties( getTitleName(i), new String[] {PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_WIDTH}, new Object[] {TitlePosX, TitleWidth}); } CurUnoDialog.setControlProperty("lblColumnNames", PropertyNames.PROPERTY_WIDTH, FieldNameWidth); CurUnoDialog.setControlProperty( "lblColumnTitles", PropertyNames.PROPERTY_POSITION_X, TitlePosX); }
protected void setControlGroupVisible(int _index, boolean _bIsVisible) { CurUnoDialog.setControlVisible(getColumnName(_index), _bIsVisible); CurUnoDialog.setControlVisible(getTitleName(_index), _bIsVisible); }