diff options
Diffstat (limited to 'wizards/com/sun/star/wizards/form')
8 files changed, 100 insertions, 92 deletions
diff --git a/wizards/com/sun/star/wizards/form/DataEntrySetter.java b/wizards/com/sun/star/wizards/form/DataEntrySetter.java index 7fab3dcdd5b1..ae042fa7de76 100644 --- a/wizards/com/sun/star/wizards/form/DataEntrySetter.java +++ b/wizards/com/sun/star/wizards/form/DataEntrySetter.java @@ -34,6 +34,7 @@ import com.sun.star.wizards.common.Properties; import com.sun.star.wizards.ui.UnoDialog; import com.sun.star.wizards.ui.WizardDialog; import com.sun.star.wizards.ui.UIConsts; +import com.sun.star.wizards.common.PropertyNames; public class DataEntrySetter { @@ -61,7 +62,7 @@ public class DataEntrySetter optNewDataOnly = CurUnoDialog.insertRadioButton("optNewDataOnly", "toggleCheckBoxes", this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -71,7 +72,7 @@ public class DataEntrySetter optDisplayAllData = CurUnoDialog.insertRadioButton("optDisplayAllData", "toggleCheckBoxes", this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -80,7 +81,7 @@ public class DataEntrySetter chknomodification = CurUnoDialog.insertCheckBox("chknomodification", null, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -89,7 +90,7 @@ public class DataEntrySetter chknodeletion = CurUnoDialog.insertCheckBox("chknodeletion", null, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -98,7 +99,7 @@ public class DataEntrySetter chknoaddition = CurUnoDialog.insertCheckBox("chknoaddition", null, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -107,7 +108,7 @@ public class DataEntrySetter CurUnoDialog.insertLabel("lbldontdisplayExistingData", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -121,9 +122,9 @@ public class DataEntrySetter if (optDisplayAllData.getState()) { retProperties = new PropertyValue[3]; - boolean bAllowUpdates = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknomodification), "State")).shortValue()) != 1; - boolean bAllowDeletes = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknodeletion), "State")).shortValue()) != 1; - boolean bAllowInserts = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknoaddition), "State")).shortValue()) != 1; + boolean bAllowUpdates = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknomodification), PropertyNames.PROPERTY_STATE)).shortValue()) != 1; + boolean bAllowDeletes = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknodeletion), PropertyNames.PROPERTY_STATE)).shortValue()) != 1; + boolean bAllowInserts = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknoaddition), PropertyNames.PROPERTY_STATE)).shortValue()) != 1; retProperties[0] = Properties.createProperty("AllowUpdates", new Boolean(bAllowUpdates)); retProperties[1] = Properties.createProperty("AllowDeletes", new Boolean(bAllowDeletes)); retProperties[2] = Properties.createProperty("AllowInserts", new Boolean(bAllowInserts)); @@ -140,8 +141,8 @@ public class DataEntrySetter public void toggleCheckBoxes() { boolean bdisplayalldata = optDisplayAllData.getState(); - Helper.setUnoPropertyValue(UnoDialog.getModel(chknomodification), "Enabled", new Boolean(bdisplayalldata)); - Helper.setUnoPropertyValue(UnoDialog.getModel(chknodeletion), "Enabled", new Boolean(bdisplayalldata)); - Helper.setUnoPropertyValue(UnoDialog.getModel(chknoaddition), "Enabled", new Boolean(bdisplayalldata)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chknomodification), PropertyNames.PROPERTY_ENABLED, new Boolean(bdisplayalldata)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chknodeletion), PropertyNames.PROPERTY_ENABLED, new Boolean(bdisplayalldata)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chknoaddition), PropertyNames.PROPERTY_ENABLED, new Boolean(bdisplayalldata)); } } diff --git a/wizards/com/sun/star/wizards/form/FieldLinker.java b/wizards/com/sun/star/wizards/form/FieldLinker.java index a3b4b7f5b70a..b0fecf192bb8 100644 --- a/wizards/com/sun/star/wizards/form/FieldLinker.java +++ b/wizards/com/sun/star/wizards/form/FieldLinker.java @@ -39,6 +39,7 @@ import com.sun.star.wizards.ui.UnoDialog; import com.sun.star.wizards.ui.WizardDialog; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.DBLimitedFieldSelection; +import com.sun.star.wizards.common.PropertyNames; public class FieldLinker extends DBLimitedFieldSelection { @@ -93,7 +94,7 @@ public class FieldLinker extends DBLimitedFieldSelection lblSlaveFields[i] = CurUnoDialog.insertLabel("lblSlaveFieldLink" + new Integer(i + 1).toString(), new String[] { - "Enabled", "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -103,15 +104,15 @@ public class FieldLinker extends DBLimitedFieldSelection new String[] { "Dropdown", - "Enabled", - "Height", - "HelpURL", + PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, "LineCount", - "PositionX", - "PositionY", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -130,7 +131,7 @@ public class FieldLinker extends DBLimitedFieldSelection lblMasterFields[i] = CurUnoDialog.insertLabel("lblMasterFieldLink" + new Integer(i + 1).toString(), new String[] { - "Enabled", "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -141,15 +142,15 @@ public class FieldLinker extends DBLimitedFieldSelection new String[] { "Dropdown", - "Enabled", - "Height", - "HelpURL", + PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, "LineCount", - "PositionX", - "PositionY", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -205,10 +206,10 @@ public class FieldLinker extends DBLimitedFieldSelection { if (i < rowcount) { - Helper.setUnoPropertyValue(UnoDialog.getModel(lblSlaveFields[i]), "Enabled", new Boolean(bDoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), "Enabled", new Boolean(bDoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lblMasterFields[i]), "Enabled", new Boolean(bDoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), "Enabled", new Boolean(bDoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lblSlaveFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lblMasterFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); if (bDoEnable == false) { Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), "SelectedItems", new short[] { 0 }); diff --git a/wizards/com/sun/star/wizards/form/Finalizer.java b/wizards/com/sun/star/wizards/form/Finalizer.java index d8ce6262731a..c5f12728e527 100644 --- a/wizards/com/sun/star/wizards/form/Finalizer.java +++ b/wizards/com/sun/star/wizards/form/Finalizer.java @@ -29,6 +29,7 @@ package com.sun.star.wizards.form; import com.sun.star.awt.XRadioButton; import com.sun.star.awt.XTextComponent; import com.sun.star.wizards.common.Desktop; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.*; /** @@ -59,7 +60,7 @@ public class Finalizer CurUnoDialog.insertLabel("lblFormName", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -68,7 +69,7 @@ public class Finalizer txtFormName = CurUnoDialog.insertTextField("txtFormName", "toggleFinishButton", this, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Text", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -77,7 +78,7 @@ public class Finalizer CurUnoDialog.insertLabel("lblProceed", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -86,7 +87,7 @@ public class Finalizer CurUnoDialog.insertRadioButton("optWorkWithForm", null, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -95,7 +96,7 @@ public class Finalizer optModifyForm = CurUnoDialog.insertRadioButton("optModifyForm", null, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { diff --git a/wizards/com/sun/star/wizards/form/FormConfiguration.java b/wizards/com/sun/star/wizards/form/FormConfiguration.java index d1f1afdfac54..9c18ab47d79d 100644 --- a/wizards/com/sun/star/wizards/form/FormConfiguration.java +++ b/wizards/com/sun/star/wizards/form/FormConfiguration.java @@ -31,6 +31,7 @@ import com.sun.star.awt.XFixedText; import com.sun.star.awt.XListBox; import com.sun.star.awt.XRadioButton; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.CommandFieldSelection; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; @@ -78,7 +79,7 @@ public class FormConfiguration chkcreateSubForm = CurUnoDialog.insertCheckBox("chkcreateSubForm", SSUBFORMMODE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -87,7 +88,7 @@ public class FormConfiguration optOnExistingRelation = CurUnoDialog.insertRadioButton("optOnExistingRelation", STOGGLESTEPS, this, new String[] { - "Enabled", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -96,7 +97,7 @@ public class FormConfiguration optSelectManually = CurUnoDialog.insertRadioButton("optSelectManually", STOGGLESTEPS, this, new String[] { - "Enabled", "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -105,7 +106,7 @@ public class FormConfiguration lblRelations = CurUnoDialog.insertLabel("lblSelectRelation", new String[] { - "Enabled", "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -114,7 +115,7 @@ public class FormConfiguration lstRelations = CurUnoDialog.insertListBox("lstrelations", SONEXISTINGRELATIONSELECTION, SONEXISTINGRELATIONSELECTION, this, new String[] { - "Enabled", "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, 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[] { @@ -123,7 +124,7 @@ public class FormConfiguration lblSubFormDescription = CurUnoDialog.insertLabel("lblSubFormDescription", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -134,7 +135,7 @@ public class FormConfiguration // public void disableSubFormCheckBox() // { - // Helper.setUnoPropertyValue(UnoDialog.getModel(chkcreateSubForm), "Enabled", Boolean.FALSE); + // Helper.setUnoPropertyValue(UnoDialog.getModel(chkcreateSubForm), PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); // } public RelationController getRelationController() @@ -150,8 +151,8 @@ public class FormConfiguration public void toggleSubFormMode() { boolean bdoEnable = (this.chkcreateSubForm.getState() == 1); - Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), "Enabled", new Boolean(bdoEnable && bsupportsRelations)); - Helper.setUnoPropertyValue(UnoDialog.getModel(optSelectManually), "Enabled", new Boolean(bdoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable && bsupportsRelations)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optSelectManually), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable)); toggleSteps(); } @@ -163,7 +164,7 @@ public class FormConfiguration Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), "StringItemList", sreferencedTables); this.CurSubFormFieldSelection = _CurSubFormFieldSelection; toggleRelationsListbox(); - Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), "Enabled", new Boolean(bsupportsRelations && (chkcreateSubForm.getState() == 1))); + Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, new Boolean(bsupportsRelations && (chkcreateSubForm.getState() == 1))); } public void toggleSteps() @@ -230,8 +231,8 @@ public class FormConfiguration private void toggleRelationsListbox() { boolean bdoenable = bsupportsRelations && this.optOnExistingRelation.getState() && (chkcreateSubForm.getState() == 1); - Helper.setUnoPropertyValue(UnoDialog.getModel(lblRelations), "Enabled", new Boolean(bdoenable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), "Enabled", new Boolean(bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lblRelations), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable)); } public boolean hasSubForm() diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java index 9a0c58fd41b8..f5478525eab1 100644 --- a/wizards/com/sun/star/wizards/form/FormControlArranger.java +++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java @@ -36,6 +36,7 @@ import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Exception; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.Resource; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.db.*; import com.sun.star.wizards.document.Control; import com.sun.star.wizards.document.DatabaseControl; @@ -643,7 +644,7 @@ public class FormControlArranger if (DBControlList[i].getControlType() == FormHandler.SOCHECKBOX) { // Checkboxes have no Label near by - DBControlList[i].setPropertyValue("Label", ""); + DBControlList[i].setPropertyValue(PropertyNames.PROPERTY_LABEL, ""); } } } @@ -662,7 +663,7 @@ public class FormControlArranger } if (nFieldType == DataType.LONGVARCHAR) /* memo */ { - Helper.setUnoPropertyValue(LabelControlList[i], "MultiLine", Boolean.TRUE); + Helper.setUnoPropertyValue(LabelControlList[i], PropertyNames.PROPERTY_MULTILINE, Boolean.TRUE); } checkOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, true); aDBControl.setPropertyValue("Border", NBorderType); diff --git a/wizards/com/sun/star/wizards/form/FormWizard.java b/wizards/com/sun/star/wizards/form/FormWizard.java index eb25fb65c78d..f75f3e1b84ab 100644 --- a/wizards/com/sun/star/wizards/form/FormWizard.java +++ b/wizards/com/sun/star/wizards/form/FormWizard.java @@ -32,6 +32,7 @@ import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XComponent; import com.sun.star.sdb.application.DatabaseObject; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.NoValidPathException; import com.sun.star.wizards.common.Properties; @@ -81,7 +82,7 @@ public class FormWizard extends DatabaseObjectWizard Helper.setUnoPropertyValues(xDialogModel, new String[] { - "Height", "Moveable", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Title", "Width" + PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -230,7 +231,7 @@ public class FormWizard extends DatabaseObjectWizard insertLabel("lblBinaryHelpText", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -245,7 +246,7 @@ public class FormWizard extends DatabaseObjectWizard insertLabel("lblSubFormBinaryHelpText", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -457,7 +458,7 @@ public class FormWizard extends DatabaseObjectWizard curDBCommandFieldSelection.setModified(true); boolean benable = curDBCommandFieldSelection.getSelectedFieldNames().length > 0; enablefromStep(SOSUBFORM_PAGE, benable); - setControlProperty("btnWizardNext", "Enabled", new Boolean(benable)); + setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, new Boolean(benable)); if (benable) { if (curFormConfiguration.hasSubForm()) @@ -470,7 +471,7 @@ public class FormWizard extends DatabaseObjectWizard setStepEnabled(SOFIELDLINKER_PAGE, false); } } - setControlProperty("btnWizardFinish", "Enabled", new Boolean(benable)); + setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, new Boolean(benable)); } } } diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index e1b27c05e7aa..5098a1ffbb74 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -43,6 +43,7 @@ import com.sun.star.wizards.common.FileAccess; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.NoValidPathException; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.document.Control; import com.sun.star.wizards.document.DatabaseControl; import com.sun.star.wizards.document.GridControl; @@ -111,7 +112,7 @@ public class StyleApplier CurUnoDialog.insertLabel("lblStyles", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -121,7 +122,7 @@ public class StyleApplier lstStyles = CurUnoDialog.insertListBox("lstStyles", null, SCHANGELAYOUT, this, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "SelectedItems", "Step", "StringItemList", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "SelectedItems", PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -131,7 +132,7 @@ public class StyleApplier optNoBorder = CurUnoDialog.insertRadioButton("otpNoBorder", SCHANGEBORDERTYPE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Tag", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -141,7 +142,7 @@ public class StyleApplier opt3DLook = CurUnoDialog.insertRadioButton("otp3DLook", SCHANGEBORDERTYPE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Tag", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -151,7 +152,7 @@ public class StyleApplier optFlat = CurUnoDialog.insertRadioButton("otpFlat", SCHANGEBORDERTYPE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Tag", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -161,7 +162,7 @@ public class StyleApplier CurUnoDialog.insertFixedLine("lnFieldBorder", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -193,7 +194,7 @@ public class StyleApplier for (int i = 0; i < StyleNodeNames.length; i++) { Object oStyleNode = xNameAccess.getByName(StyleNodeNames[i]); - StyleNames[i] = (String) Helper.getUnoPropertyValue(oStyleNode, "Name"); + StyleNames[i] = (String) Helper.getUnoPropertyValue(oStyleNode, PropertyNames.PROPERTY_NAME); FileNames[i] = (String) Helper.getUnoPropertyValue(oStyleNode, "CssHref"); } } diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java index 0add27db3625..d4cd1ccc7cb6 100644 --- a/wizards/com/sun/star/wizards/form/UIControlArranger.java +++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java @@ -34,6 +34,7 @@ import com.sun.star.awt.XItemListener; import com.sun.star.awt.XRadioButton; import com.sun.star.lang.EventObject; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.NoValidPathException; import com.sun.star.wizards.document.Control; // import com.sun.star.wizards.ui.ImageList; @@ -78,7 +79,7 @@ public class UIControlArranger flnLabelPlacement = CurUnoDialog.insertFixedLine("lnLabelPlacement", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -88,7 +89,7 @@ public class UIControlArranger optAlignLeft = CurUnoDialog.insertRadioButton("optAlignLeft", SOALIGNMETHOD, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -98,7 +99,7 @@ public class UIControlArranger optAlignRight = CurUnoDialog.insertRadioButton("optAlignRight", SOALIGNMETHOD, this, new String[] { - "Height", "HelpURL", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -114,7 +115,7 @@ public class UIControlArranger // flnLabelPlacement = CurUnoDialog.insertFixedLine("lnArrangementHeader1", // new String[] // { -// "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" +// PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH // }, // new Object[] // { @@ -128,15 +129,15 @@ public class UIControlArranger // CurUnoDialog.insertButton("btnLayout1", "btnLayout1", // new String[] // { -// "Enabled", -// "Height", -// "HelpURL", -// "Label", -// "PositionX", -// "PositionY", -// "Step", -// "TabIndex", -// "Width" +// PropertyNames.PROPERTY_ENABLED, +// PropertyNames.PROPERTY_HEIGHT, +// PropertyNames.PROPERTY_HELPURL, +// PropertyNames.PROPERTY_LABEL, +// PropertyNames.PROPERTY_POSITION_X, +// PropertyNames.PROPERTY_POSITION_Y, +// PropertyNames.PROPERTY_STEP, +// PropertyNames.PROPERTY_TABINDEX, +// PropertyNames.PROPERTY_WIDTH // }, // new Object[] // { @@ -200,7 +201,7 @@ public class UIControlArranger public void enableSubFormImageList(boolean _bdoEnable) { m_aArrangeList[1].m_aButtonList.setenabled(_bdoEnable); - CurUnoDialog.setControlProperty("lnLabelPlacment_2", "Enabled", new Boolean(_bdoEnable)); + CurUnoDialog.setControlProperty("lnLabelPlacment_2", PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoEnable)); } public short getAlignValue() @@ -243,9 +244,9 @@ public class UIControlArranger private void enableAlignControlGroup(boolean _bEnableAlignControlGroup) { - Helper.setUnoPropertyValue(UnoDialog.getModel(flnLabelPlacement), "Enabled", new Boolean(_bEnableAlignControlGroup)); - Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), "Enabled", new Boolean(_bEnableAlignControlGroup)); - Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignRight), "Enabled", new Boolean(_bEnableAlignControlGroup)); + Helper.setUnoPropertyValue(UnoDialog.getModel(flnLabelPlacement), PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnableAlignControlGroup)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnableAlignControlGroup)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignRight), PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnableAlignControlGroup)); } // private class ArrangeImageList implements XItemListener @@ -262,7 +263,7 @@ public class UIControlArranger // CurUnoDialog.insertFixedLine("lnLabelPlacment_" + (_formindex + 1), // new String[] // { -// "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" +// PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH // }, // new Object[] // { @@ -293,7 +294,7 @@ public class UIControlArranger // // public void setToLeftAlign() // { -// Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), "State", new Short((short) 1)); +// Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), PropertyNames.PROPERTY_STATE, new Short((short) 1)); // } // // /* (non-Javadoc) @@ -383,13 +384,13 @@ public class UIControlArranger CurUnoDialog.insertFixedLine("lnLabelPlacment_" + (_formindex + 1), new String[] { - "Height", - "Label", - "PositionX", - "PositionY", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -426,7 +427,7 @@ public class UIControlArranger public void setToLeftAlign() { - Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), "State", new Short((short) 1)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), PropertyNames.PROPERTY_STATE, new Short((short) 1)); } /* (non-Javadoc) |