Class TLcyGroupDescriptor

java.lang.Object
com.luciad.lucy.gui.TLcyGroupDescriptor

public class TLcyGroupDescriptor extends Object
Represents a group of elements. This way, elements like actions, components, etc. can be grouped logically according to their TLcyGroupDescriptor.

Group descriptors are for example used in an ILcyActionBar (e.g. a tool bar) to know which buttons belong together. Buttons belonging to the same group can then be visually distinguished from other buttons by using separators.

Note that this concept is totally unrelated to javax.swing.ButtonGroup. That group is used to make sure only one radio button of a group is activated at a given time.

To check if group descriptors are equal, their equals method should be used.

See Also:
  • Field Details

  • Constructor Details

    • TLcyGroupDescriptor

      public TLcyGroupDescriptor()
      Creates a new, unique TLcyGroupDescriptor. equals will only return true if this instance is given as a parameter.
    • TLcyGroupDescriptor

      public TLcyGroupDescriptor(String aUID)

      Creates a new TLcyGroupDescriptor, identified by the given unique ID.

      If multiple TLcyGroupDescriptors are created with the same aID, using equals on one such instance with the other instance as an argument will return true.

      If the given UID contains a ';' character, then the actual UID that is used will be the part before the ';'. The part after the semicolon is typically interpreted by the group descriptor order.

      Parameters:
      aUID - The identifier that uniquely identifies this TLcyGroupDescriptor.
  • Method Details

    • getUID

      public String getUID()
      Returns the UID passed in the constructor, or null if no UID was set.
      Returns:
      the UID passed in the constructor, or null if no UID was set.
    • equals

      public boolean equals(Object obj)
      Returns true if the UID's of this instance and the given instance are equal and both not null. If both UID's are null, only returns true if this == obj.
      Overrides:
      equals in class Object
      Parameters:
      obj - The object to compare with.
      Returns:
      True if the group descriptors are equal, false otherwise.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object