Class 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
    • 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.
      • 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.
      • isPrivate

        public final boolean isPrivate
        Private property flag.
    • Constructor Detail

      • 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.
      • 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.