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