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); }
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); }