Package com.iizigo.prop
Class PropertyEditorInfo
java.lang.Object
com.iizigo.prop.PropertyEditorInfo
- All Implemented Interfaces:
Cloneable
Class used to map property name to texts.
- Author:
- Christopher Mindus
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Class used to hold information about an edited item during creation.Field Summary
Modifier and TypeFieldDescriptionfinal Atom
The property Atom, null for special ones.final String
The default property value.final String
The definition name in the properties file.final String[]
Options for the composite editor, null for none.final IEditedPropertyEntry<?,
?> Class providing the property editor.final String
The group.final IGroupTextFormatter
The group formatter, null for none.final String
The group text prompt.final String
The group tool tip text.final boolean
Private property flag.The required flag.The GProp class.final String
The name of the property.final PropertyEditorSetup
The property editor object.final String
The text prompt.final String
The tooltip text.final IEntryValidator
The validator/property converter, null if none.Constructor Summary
ConstructorDescriptionDynamic creation of a editable property item for the Java Action Actor.PropertyEditorInfo
(PropertyEditorSetup pes, String propertyName, String definitionName, PropertyEditorInfoOptions options) Constructor.Method Summary
Modifier and TypeMethodDescriptioncopyForParent
(String altParentPropertyName) Creates a copy of the instance with an alternate parent.createControls
(PropertyEditor editor, Composite entryPart, com.iizigo.prop.PropertyEditorLayout pl, MultiPropLabel mlabel, DefinedButton definedButton, PropertyEditor.Node node, PropCnr[] containers) Creates the controls required.getCombinedPropertyEditorInfos
(PropCnr[] pcs, ArrayList<PropertyEditorInfo>[] infosArray) Creates the combined EditProperties for an array of properties.getCombinedPropertyEditorInfos
(PropCnr pc, ArrayList<PropertyEditorInfo> infosArray) Creates the combined EditProperties for a single property that are edited.Gets the group info.Gets the parent property name that must be present, null for none.static boolean
hasAtLeastOnePropertyInGroup
(Collection<PropertyEditorInfo> infos, String[] propertyNames) Helper to check for at least one property in group.boolean
isName()
Checks if this is the property name editor.boolean
Checks if this is a special property for extends, or the property name itself etc.static String
verifyPropertiesPresentInGroup
(Collection<PropertyEditorInfo> infos, String[] propertyNames) Helper to verify properties are present for a group.
Field Details
propertyName
The name of the property.definitionName
The definition name in the properties file.atom
The property Atom, null for special ones.options
The required flag.textPrompt
The text prompt.toolTipText
The tooltip text.group
The group.groupTextPrompt
The group text prompt.groupToolTipText
The group tool tip text.propertyClass
The GProp class.defaultPropertyValue
The default property value.editProperty
Class providing the property editor.editOptions
Options for the composite editor, null for none.validator
The validator/property converter, null if none.groupFormatter
The group formatter, null for none.setup
The property editor object.isPrivate
public final boolean isPrivatePrivate property flag.
Constructor Details
PropertyEditorInfo
public PropertyEditorInfo(PropertyEditorSetup pes, String propertyName, String definitionName, PropertyEditorInfoOptions options) Constructor.PropertyEditorInfo
Dynamic creation of a editable property item for the Java Action Actor.- Parameters:
jap
- The annotation.- Throws:
IllegalArgumentException
- For errors.ParseException
- For value parsing errors.
Method Details
getGroupInfo
Gets the group info.- Returns:
- The group info, null for none.
getParentPropertyName
Gets the parent property name that must be present, null for none.copyForParent
Creates a copy of the instance with an alternate parent.createControls
public MultiPropEditor createControls(PropertyEditor editor, Composite entryPart, com.iizigo.prop.PropertyEditorLayout pl, MultiPropLabel mlabel, DefinedButton definedButton, PropertyEditor.Node node, PropCnr[] containers) Creates the controls required.verifyPropertiesPresentInGroup
public static String verifyPropertiesPresentInGroup(Collection<PropertyEditorInfo> infos, String[] propertyNames) Helper to verify properties are present for a group.- Parameters:
infos
- The array of edit's for the property.propertyNames
- The property names to verify.- Returns:
- null for no error, otherwise the missing name(s) (comma separated preceded with "missing property name:").
hasAtLeastOnePropertyInGroup
public static boolean hasAtLeastOnePropertyInGroup(Collection<PropertyEditorInfo> infos, String[] propertyNames) Helper to check for at least one property in group.- Parameters:
infos
- The array of edit's for the property.propertyNames
- The names to verify.- Returns:
- null for no error, otherwise the missing name(s) (comma separated preceded with "missing property name:").
isName
public boolean isName()Checks if this is the property name editor.isSpecial
public boolean isSpecial()Checks if this is a special property for extends, or the property name itself etc. Special properties cannot be edited together in multi-edit's.getCombinedPropertyEditorInfos
public static ArrayList<PropertyEditorInfo.CreateItem> getCombinedPropertyEditorInfos(PropCnr pc, ArrayList<PropertyEditorInfo> infosArray) Creates the combined EditProperties for a single property that are edited.getCombinedPropertyEditorInfos
public static ArrayList<PropertyEditorInfo.CreateItem> getCombinedPropertyEditorInfos(PropCnr[] pcs, ArrayList<PropertyEditorInfo>[] infosArray) Creates the combined EditProperties for an array of properties.