Class MLGroup

    • Constructor Detail

      • MLGroup

        public MLGroup()
        Constructor of the container without name.
      • MLGroup

        public MLGroup​(Atom atom)
        Constructor of the container.
        Parameters:
        atom - The name of this container.
    • Method Detail

      • createDefaultItemsStyles

        protected Styles createDefaultItemsStyles()
        Creates the Styles container for default items (must be overridden by Designer to create EditorStyles).
        Returns:
        A new EditorStyles container.
      • createDefaultDescriptionStyles

        protected Styles createDefaultDescriptionStyles()
        Creates the Styles container for descriptions of items (must be overridden by Designer to create EditorStyles).
        Returns:
        A new EditorStyles container.
      • createDefaultItemProp

        protected MLDefaultItemProp createDefaultItemProp()
        Creates the MLDefaultItemProp instance.
        Returns:
        A new MLDefaultItemProp instance.
      • getDefaultItemProp

        protected MLDefaultItemProp getDefaultItemProp()
        Returns the default item property instance.
      • addPredefinedProps

        protected void addPredefinedProps()
                                   throws PropException
        Adds the predefined properties for this container. This method is called once just after construction of the property container and sometimes population of it.

        The method should add properties to create or get reference to using the maybeAddProp method. When the PropCnr instance is cloned, the method getPredefinedProps() is called in order for the subclass to be able to retrieve the new instances to these properties, if stored in instance variables.

        Overrides:
        addPredefinedProps in class UIContainer
        Throws:
        PropException - for property exceptions.
      • createListItemProp

        protected MLItemProp createListItemProp​(Atom atom)
        Creates a list item property.
        Parameters:
        atom - The name.
        Returns:
        The property.
      • createItem

        protected MLItemProp createItem​(Atom atom,
                                        MLItem data)
        Creates a new property item from an item data holder and initializes the property.
        Specified by:
        createItem in class AbstractContentUIContainer<MLItemProp,​MLItem>
        Parameters:
        atom - The name of the item property.
        data - The data to initialize the item property with.
        Returns:
        The item property.
      • getVSColumnIndex

        protected int getVSColumnIndex​(java.lang.Object nameOrAtom)
        Gets the table column reference property with the String or Atom. This call makes it possible to redirect the reference into another container, e.g. for the MList default item. By default, the property is taken from this container.
        Overrides:
        getVSColumnIndex in class AbstractContentUIContainer<MLItemProp,​MLItem>
        Parameters:
        nameOrAtom - The String name or Atom name.
        Returns:
        The VS table column index found, or -1 for none.
      • getIconProvider

        public IMListIconProvider getIconProvider()
        Gets the custom instance of the icon provider for the group.
        Returns:
        The instance, or null for none.
      • getClassReferenceAtom

        public Atom getClassReferenceAtom​(java.lang.String id)
        Gets the ClassReference atom name.
        Specified by:
        getClassReferenceAtom in interface IClassReferenceOwner
        Parameters:
        id - ID for the class reference if several exist, null for default.
        Returns:
        The class reference atom name for the ID.
      • getClassReference

        public ClassReference getClassReference​(java.lang.String id,
                                                boolean doCreateIfNotPresent)
        Gets or creates the ClassReference in the property container.
        Specified by:
        getClassReference in interface IClassReferenceOwner
        Parameters:
        id - ID for the class reference if several exist, null for default.
        doCreateIfNotPresent - Flag to create the property (this flag can only be true in Designer)!
        Returns:
        The resolved class reference instance, null if the ClassReference doesn't exist if the create flag is false. If flag is true, an orphan unresolved EditorClassReference instance (ONLY for the Designer).
      • isClassReferenceAnnotationBackReferenceRequired

        public boolean isClassReferenceAnnotationBackReferenceRequired​(java.lang.String id)
        Checks if the ClassReference require an annotation back-reference.
        Specified by:
        isClassReferenceAnnotationBackReferenceRequired in interface IClassReferenceOwner
        Parameters:
        id - ID for the class reference if several exist, null for default.
        Returns:
        true if the annotation is required to have a back-reference on the "ref" member value pair to the ClassReference owner.
      • getClassReferenceImplementsInterface

        public java.lang.String getClassReferenceImplementsInterface​(java.lang.String id)
        Returns the required Interface.
        Specified by:
        getClassReferenceImplementsInterface in interface IClassReferenceOwner
        Parameters:
        id - ID for the class reference if several exist, null for default.
        Returns:
        The fully qualified name of the interface for the class, or null for none.
      • getClassReferenceRequiredAnnotation

        public java.lang.String getClassReferenceRequiredAnnotation​(java.lang.String id)
        Returns the required annotation, or null for none.
        Specified by:
        getClassReferenceRequiredAnnotation in interface IClassReferenceOwner
        Parameters:
        id - ID for the class reference if several exist, null for default.
        Returns:
        The fully qualified name of the interface for the class, or null for none.
      • onItemAdded

        protected void onItemAdded​(MLItemProp item)
        Item added event.

        Subclasses can implements its routine to initialize the required object that governs the API behavior of the property.

        Do not forget to FIRST call the super.onItemAdded(item) if overridden.

        Overrides:
        onItemAdded in class AbstractContentUIContainer<MLItemProp,​MLItem>
        Parameters:
        item - The item added.
      • onItemRemoved

        protected void onItemRemoved​(MLItemProp item)
        Item removed event.

        Subclasses can implements its routine to clean-up a potentially required object that governs the API behavior of the property.

        Do not forget to FIRST call the super.onItemRemoved(item) if overridden.

        Overrides:
        onItemRemoved in class AbstractContentUIContainer<MLItemProp,​MLItem>
        Parameters:
        item - The item removed.
      • getHeadingText

        public KString getHeadingText()
        Gets the heading text.
        Returns:
        The text, or null if none is set.
      • getDefaultType

        public MLItemType getDefaultType()
        Gets the default type specified for the group.
        Returns:
        The list item type.