Class MList

    • Constructor Detail

      • MList

        public MList()
        Creates the container without name with a null value.
      • MList

        public MList​(Atom propertyAtom)
        Creates the container with the specified name with a null value.
        Parameters:
        propertyAtom - the property atom.
      • MList

        public MList​(Atom propertyAtom,
                     GProp<?>[] properties)
              throws PropException
        Creates the container with the specified name and properties.
        Parameters:
        propertyAtom - the property atom.
        properties - the property array value for the container.
        Throws:
        PropException - when properties are not correctly defined.
    • Method Detail

      • getApproximateSize

        public Size getApproximateSize()
        Returns the size of the component in pixels. The size is a calculation and does not exactly reflect the real size that may be different due to additional styles not taken into account by this method. The size is calculated from the font of the component and default or defined values (such as character length or number of lines for text area).
        Overrides:
        getApproximateSize in class UIContainer
        Returns:
        The size of the component: 0x0 (none).
      • getFirstGroupNull

        public MLGroup getFirstGroupNull()
        Gets the first group of list items.
        Returns:
        The list item group, or null if not found.
      • getFirstGroup

        public MLGroup getFirstGroup()
                              throws NotFoundException
        Gets the first group of list items.
        Returns:
        The list item group, never null.
        Throws:
        NotFoundException - If the first list item group is not found.
      • getGroupNull

        public MLGroup getGroupNull​(java.lang.String name)
        Gets a group of list items by name.
        Parameters:
        name - The name of the group.
        Returns:
        The list item group, or null if not found.
      • getGroup

        public MLGroup getGroup​(java.lang.String name)
                         throws NotFoundException
        Gets a group of list items by name.
        Parameters:
        name - The name of the group.
        Returns:
        The list item group, never null.
        Throws:
        NotFoundException - If the list item group is not found.
      • add

        public void add​(MLItem item)
                 throws NotFoundException
        Adds a new item last in the first group.

        Note: This method is a convenience access method, and for best performance, use the API methods from the MLGroup class. Retrieve the group with getFirstGroup().

        Parameters:
        item - The item to insert.
        Throws:
        NotFoundException - If the first list item group is not found.
        java.lang.IllegalStateException - When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
      • add

        public void add​(int index,
                        MLItem item)
                 throws NotFoundException
        Inserts a new item before the specified index in the first group.

        Note: This method is a convenience access method, and for best performance, use the API methods from the MLGroup class. Retrieve the group with getFirstGroup().

        Parameters:
        index - The insertion point index, -1 for last.
        item - The item to insert.
        Throws:
        NotFoundException - If the first list item group is not found.
        java.lang.IndexOutOfBoundsException - If the index is not valid.
        java.lang.IllegalStateException - When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
      • remove

        public MLItem remove​(int index)
                      throws NotFoundException
        Removes an item at the specified index from the first group.

        Note: This method is a convenience access method, and for best performance, use the API methods from the MLGroup class. Retrieve the group with getFirstGroup().

        Parameters:
        index - The item to remove.
        Returns:
        The removed item.
        Throws:
        NotFoundException - If the first list item group is not found.
        java.lang.IndexOutOfBoundsException - If the index is not valid.
        java.lang.IllegalStateException - When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
      • remove

        public boolean remove​(MLItem item)
                       throws NotFoundException
        Removes an item from the first group.

        Note: This method is a convenience access method, and for best performance, use the API methods from the MLGroup class. Retrieve the group with getFirstGroup().

        Parameters:
        item - The item to remove.
        Returns:
        true for success, false if not found.
        Throws:
        NotFoundException - If the first list item group is not found.
        java.lang.IllegalStateException - When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
      • removeAll

        public boolean removeAll()
                          throws NotFoundException
        Removes all items from the first group.

        Note: This method is a convenience access method, and for best performance, use the API methods from the MLGroup class. Retrieve the group with getFirstGroup().

        Returns:
        true for changed, false when no items were present.
        Throws:
        NotFoundException - If the first list item group is not found.
        java.lang.IllegalStateException - When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
      • getItemCount

        public int getItemCount()
                         throws NotFoundException
        Returns the list item count in the first group.

        Note: This method is a convenience access method, and for best performance, use the API methods from the MLGroup class. Retrieve the group with getFirstGroup().

        Returns:
        The current count of items.
        Throws:
        NotFoundException - If the first list item group is not found.
      • get

        public MLItem get​(int index)
                   throws NotFoundException
        Removes an item at the specified index from the first group.

        Note: This method is a convenience access method, and for best performance, use the API methods from the MLGroup class. Retrieve the group with getFirstGroup().

        Parameters:
        index - The item to remove.
        Returns:
        The removed item.
        Throws:
        NotFoundException - If the first list item group is not found.
        java.lang.IndexOutOfBoundsException - If the index is not valid.
        java.lang.IllegalStateException - When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
      • getAll

        public MLItem[] getAll()
                        throws NotFoundException
        Gets all the list items from the first group.

        Note: This method is a convenience access method, and for best performance, use the API methods from the MLGroup class. Retrieve the group with getFirstGroup().

        Returns:
        The array of list items.
        Throws:
        NotFoundException - If the first list item group is not found.
      • getActionItem

        public MLItemProp getActionItem()
        Returns the action that last triggered the OnUIAction, VSAction or VS focus.
        Returns:
        The List Item, null for none.