Class PVEnumeratedFactory

  • All Implemented Interfaces:
    PVEnumerated

    public final class PVEnumeratedFactory
    extends Object
    implements PVEnumerated
    Implementation of PVEnumerated.
    Author:
    mrk
    • Constructor Detail

      • PVEnumeratedFactory

        public PVEnumeratedFactory()
    • Method Detail

      • create

        public static PVEnumerated create()
        Create a PVControl.
        Returns:
        the newly created PVControl
      • attach

        public boolean attach​(PVField pvField)
        Description copied from interface: PVEnumerated
        Attempt to attach to the enumerated field. The field must either be an enumerated field itself or a subfield of the parent of a field named value.
        Specified by:
        attach in interface PVEnumerated
        Parameters:
        pvField - The field for which to find an enumerated field,
        Returns:
        (false,true) if enumerated field (not found, found).
      • detach

        public void detach()
        Description copied from interface: PVEnumerated
        Remove attachment to an enumerated field.
        Specified by:
        detach in interface PVEnumerated
      • isAttached

        public boolean isAttached()
        Description copied from interface: PVEnumerated
        Is this attached to an enumerated structure.
        Specified by:
        isAttached in interface PVEnumerated
        Returns:
        false or true.
      • choicesMutable

        public boolean choicesMutable()
        Description copied from interface: PVEnumerated
        Are the choices mutable.
        Specified by:
        choicesMutable in interface PVEnumerated
        Returns:
        false or true
      • getChoice

        public String getChoice()
        Description copied from interface: PVEnumerated
        Get the choice corresponding to the current index.
        Specified by:
        getChoice in interface PVEnumerated
        Returns:
        the value
      • getIndex

        public int getIndex()
        Description copied from interface: PVEnumerated
        Get the current index.
        Specified by:
        getIndex in interface PVEnumerated
        Returns:
        the value
      • setChoices

        public boolean setChoices​(String[] choices)
        Description copied from interface: PVEnumerated
        Set the choices.
        Specified by:
        setChoices in interface PVEnumerated
        Parameters:
        choices - the choices
        Returns:
        (false,true) in choices are (immutable, mutable)
      • setIndex

        public boolean setIndex​(int index)
        Description copied from interface: PVEnumerated
        Set the index.
        Specified by:
        setIndex in interface PVEnumerated
        Parameters:
        index - the value
        Returns:
        (false,true) if the index (was not, was) modified.