| java.lang.Object net.xoetrope.builder.editor.components.PropertyHelper
All known Subclasses: net.xoetrope.builder.editor.components.swing.XCheckBoxHelper, net.xoetrope.builder.editor.components.swing.XTabPanelHelper, net.xoetrope.builder.editor.components.swing.XImageMapHelper, net.xoetrope.builder.editor.components.swing.XUnknownHelper, net.xoetrope.builder.editor.components.swing.XHotspotImageHelper, net.xoetrope.builder.editor.components.swing.XPanelHelper, net.xoetrope.builder.editor.components.swing.XEditHelper, net.xoetrope.builder.editor.components.swing.XScrollPaneHelper, net.xoetrope.builder.editor.components.swing.XLabelHelper, net.xoetrope.builder.editor.components.swing.XButtonHelper, net.xoetrope.builder.editor.components.swing.XTextAreaHelper, net.xoetrope.builder.editor.components.swing.XMenuBarHelper, net.xoetrope.builder.editor.components.swing.XPageHelper, net.xoetrope.builder.editor.components.XUnknownHelper, net.xoetrope.builder.editor.components.swing.XMetaContentHelper, net.xoetrope.builder.editor.components.swing.XComboBoxHelper, net.xoetrope.builder.editor.components.swing.XImageHelper, net.xoetrope.builder.editor.components.MultipleSelectionHelper, net.xoetrope.builder.editor.components.swing.XMenuItemHelper, net.xoetrope.builder.editor.components.swing.XMenuHelper, net.xoetrope.builder.editor.components.swing.XRadioButtonHelper, net.xoetrope.builder.editor.components.swing.XDialogHelper, net.xoetrope.builder.editor.components.swing.XTableHelper, net.xoetrope.builder.editor.components.swing.XScrollableMetaContentHelper, net.xoetrope.builder.editor.components.swing.XListHelper, net.xoetrope.builder.editor.components.swing.XSplitPaneHelper,
PropertyHelper | abstract public class PropertyHelper (Code) | | A helper class to describe the properties of an individual component
Copyright (c) Xoetrope Ltd., 2002-2003
$Revision: 1.19 $
|
Method Summary | |
public boolean | addPropertyType(String name, Object type) | public boolean | allowsChildren() Check if this component allows children to be added.
true to allow addition of children. | public String | getClassName() Gets the className of the soure component. | public String | getComponentType() | public String | getData(XPageResource pageResource, Component comp, int i) | public String | getDefaultExtension() | public long | getEventMask(int i) | public String | getFileDescription() | public String[] | getFileExtensions() | public String[] | getListItems(int i) | protected String | getListPropertyValue(Component comp, int i) | public int | getNumBasicProperties() | public int | getNumProperties() | public String | getPropertyName(XPageResource pageResource, Component comp, int i) | public int | getPropertyType(int i) | public String | getPropertyValue(XPageResource pageResource, Component comp, int i) | public String | getValidation(Component comp) | public boolean | isReadOnly(Object obj) | public boolean | isSwing() | public boolean | restrictsSize() | public void | setComponent(Component comp) | public void | setCopiedProperties(XPageResource page, Component srcComp, Component targetComp) Calls the relevant component helper to set the attributes of a new component
when a paste operation has been invoked from the main menu. | public void | setData(XPageResource pageResource, Component comp, String propertyName, String value) | public void | setData(XPageResource pageResource, Component comp, XDataBinding binding) | public void | setFileExtensions(String desc, String defaultExt, String[] newExtensions) | public void | setImageName(XPageResource pageResource, Component comp, int propertyIdx, String imageName) Set the image name property. | public void | setListOptions(String name, String property, String[] options, int[] ids) | public void | setListPropertyValue(Component comp, int i, int selIdx) | public void | setPropertyValue(XPageResource pageResource, Component comp, int i, String value) | public void | setSwing(boolean iss) | public void | setValidation(Component comp, String ruleName) | public void | setViaReflection(String methodName, Component comp, Object value, boolean isBoolean) Set a property using refelction instead of the property helper. | public void | setViaReflection(String methodName, Component comp, Object value, Class objectClass) Set a property using refelction instead of the property helper. |
BOOLEAN_PROPERTY | final public static int BOOLEAN_PROPERTY(Code) | | |
DATA_PROPERTY | final public static int DATA_PROPERTY(Code) | | |
DOUBLE_PROPERTY | final public static int DOUBLE_PROPERTY(Code) | | |
EVENT_HANDLER_PROPERTY | final public static int EVENT_HANDLER_PROPERTY(Code) | | |
IMAGE_NAME_PROPERTY | final public static int IMAGE_NAME_PROPERTY(Code) | | |
INTEGER_PROPERTY | final public static int INTEGER_PROPERTY(Code) | | |
LIST_PROPERTY | final public static int LIST_PROPERTY(Code) | | |
PLAIN_PROPERTY | final public static int PLAIN_PROPERTY(Code) | | |
PROP_NAME | final public static int PROP_NAME(Code) | | |
STYLE_PROPERTY | final public static int STYLE_PROPERTY(Code) | | |
VALIDATION_PROPERTY | final public static int VALIDATION_PROPERTY(Code) | | |
allowsChildren | protected boolean allowsChildren(Code) | | |
booleanOptions | final protected static String booleanOptions(Code) | | |
isSwing | protected boolean isSwing(Code) | | |
numBasicProperties | final protected static int numBasicProperties(Code) | | |
propertyName | final protected static String propertyName(Code) | | |
propertyTypeseventMasks | protected static Hashtable propertyTypeseventMasks(Code) | | |
restrictsSize | protected boolean restrictsSize(Code) | | |
usesContentFile | protected boolean usesContentFile(Code) | | |
PropertyHelper | public PropertyHelper()(Code) | | |
addPropertyType | public boolean addPropertyType(String name, Object type)(Code) | | Add a property type if it is not already present
Parameters: name - the name of the new property Parameters: type - the property type true if successfully added, otherwise false (if it already exists) |
allowsChildren | public boolean allowsChildren()(Code) | | Check if this component allows children to be added.
true to allow addition of children. By default false is returnedas most components do not intend to allow addition of children |
getClassName | public String getClassName()(Code) | | Gets the className of the soure component. If the name has not been explicitly
set the class name of this helper is used and the name is truncated to
remove the 'Helper' part.
the class name of the source component |
getDefaultExtension | public String getDefaultExtension()(Code) | | |
getEventMask | public long getEventMask(int i)(Code) | | Get the event mask attribute
Parameters: i - the component property index the value |
getFileDescription | public String getFileDescription()(Code) | | Get a description of the file extension set to be used for file/image names in the popup chooser
an array of strings |
getFileExtensions | public String[] getFileExtensions()(Code) | | Get the file extension set to be used for file/image names in the popup chooser
an array of strings |
getListItems | public String[] getListItems(int i)(Code) | | Get the items to display for a list property
Parameters: i - the property index an array of list items |
getNumBasicProperties | public int getNumBasicProperties()(Code) | | Get the number of basic properties that every component exposes
the number of propeties |
getNumProperties | public int getNumProperties()(Code) | | Get the number of properties that the component exposes
the number of propeties |
getPropertyName | public String getPropertyName(XPageResource pageResource, Component comp, int i)(Code) | | Get the name of the property
Parameters: i - the property index Parameters: pageResource - the page resource to which this component belongs Parameters: comp - the component instance the name |
getPropertyType | public int getPropertyType(int i)(Code) | | Get the type of the property
Parameters: i - the property index the type as defined by XPropertiesEditor |
getPropertyValue | public String getPropertyValue(XPageResource pageResource, Component comp, int i)(Code) | | Get the value of the property exposed by the component
Parameters: pageResource - the page resource to which this component belongs Parameters: comp - the component instance Parameters: i - the component property index the value |
getValidation | public String getValidation(Component comp)(Code) | | Get the first validation for this component
Parameters: comp - the component reference the first validation |
isReadOnly | public boolean isReadOnly(Object obj)(Code) | | Is the property read-only?
Parameters: obj - the name of the selected property true if the property is read-only |
isSwing | public boolean isSwing()(Code) | | Is this a swing component helper?
true if it is a swing helper |
restrictsSize | public boolean restrictsSize()(Code) | | Flag the component as having a restricted size if true is returned
false |
setCopiedProperties | public void setCopiedProperties(XPageResource page, Component srcComp, Component targetComp)(Code) | | Calls the relevant component helper to set the attributes of a new component
when a paste operation has been invoked from the main menu.
Parameters: srcComp - the component which was selected when the copy or cut commandwas invoked Parameters: targetComp - the new component which will be added to the current page |
setFileExtensions | public void setFileExtensions(String desc, String defaultExt, String[] newExtensions)(Code) | | Set the array/list of extensions used by the file/image name chooser
Parameters: desc - the description of the file type. Parameters: defaultExt - the default file extension Parameters: newExtensions - |
setImageName | public void setImageName(XPageResource pageResource, Component comp, int propertyIdx, String imageName)(Code) | | Set the image name property.
Parameters: page - the page that owns the component Parameters: comp - the component whose property is being set Parameters: propertyIdx - teh index of the property Parameters: imageName - the path to the image |
setListOptions | public void setListOptions(String name, String property, String[] options, int[] ids)(Code) | | Set the list options
Parameters: name - the name by which the list is identified Parameters: property - the property being modified Parameters: options - the list of option values Parameters: ids - the values associated with the options |
setListPropertyValue | public void setListPropertyValue(Component comp, int i, int selIdx)(Code) | | Set the value of the property exposed by the component
Parameters: comp - the component instance Parameters: i - the component property index Parameters: selIdx - the index into the list of the selected item the value |
setPropertyValue | public void setPropertyValue(XPageResource pageResource, Component comp, int i, String value)(Code) | | Set the value of the property exposed by the component
Parameters: pageResource - the page resource to which this component belongs Parameters: comp - the component instance Parameters: i - the component property index the value |
setSwing | public void setSwing(boolean iss)(Code) | | Sets the flag to indicate if this is a swing component helper?
Parameters: iss - true if it is a swing helper |
setValidation | public void setValidation(Component comp, String ruleName)(Code) | | Set the validation rule for this component
Parameters: comp - the component reference Parameters: ruleName - the name of the validation rule |
setViaReflection | public void setViaReflection(String methodName, Component comp, Object value, boolean isBoolean)(Code) | | Set a property using refelction instead of the property helper.
Parameters: methodName - the method name Parameters: comp - the component being modified Parameters: value - the new value Parameters: isBoolean - is it a boolean property being modified |
setViaReflection | public void setViaReflection(String methodName, Component comp, Object value, Class objectClass)(Code) | | Set a property using refelction instead of the property helper.
Parameters: methodName - the method name Parameters: comp - the component being modified Parameters: value - the new value Parameters: objectClass - the class of the argument of the set method being invoked |
|
|