Class NamedPosition

  • All Implemented Interfaces:
    Position

    @Portable
    public class NamedPosition
    extends Object
    implements Position
    Represents the position of a child panel by name. For example, within a templated perspective, panels are positioned by ErraiUI DataField names.

    Positions that refer to the same field name compare equal to each other.

    Instances of this class are immutable.

    • Field Detail

      • ROOT

        public static final NamedPosition ROOT
        Represents the root panel of any templated perspective.
    • Constructor Detail

      • NamedPosition

        public NamedPosition​(String fieldName)
        Creates a new position representing the ErraiUI @DataField with the given name. If you are trying to refer to the root of the template itself, use ROOT.
        Parameters:
        fieldName - the name of the data field. Must be non-null.
    • Method Detail

      • getName

        public String getName()
        Returns the data field name this Position refers to.
        Specified by:
        getName in interface Position
        Returns:
        a non-null string. For the special ROOT position constant, this is the empty string.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object