Class PropertyEditorInfo

java.lang.Object
com.iizigo.prop.PropertyEditorInfo
All Implemented Interfaces:
Cloneable

public class PropertyEditorInfo extends Object implements Cloneable
Class used to map property name to texts.
Author:
Christopher Mindus
  • Field Details

    • propertyName

      public final String propertyName
      The name of the property.
    • definitionName

      public final 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 String textPrompt
      The text prompt.
    • toolTipText

      public final String toolTipText
      The tooltip text.
    • group

      public final String group
      The group.
    • groupTextPrompt

      public final String groupTextPrompt
      The group text prompt.
    • groupToolTipText

      public final String groupToolTipText
      The group tool tip text.
    • propertyClass

      public final Class<GProp<?>> propertyClass
      The GProp class.
    • defaultPropertyValue

      public final String defaultPropertyValue
      The default property value.
    • editProperty

      public final IEditedPropertyEntry<?,?> editProperty
      Class providing the property editor.
    • editOptions

      public final 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 Details

  • Method Details

    • getGroupInfo

      public PropertyEditorGroupInfo getGroupInfo()
      Gets the group info.
      Returns:
      The group info, null for none.
    • getParentPropertyName

      public String getParentPropertyName()
      Gets the parent property name that must be present, null for none.
    • copyForParent

      public PropertyEditorInfo copyForParent(String altParentPropertyName)
      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.