Package xal.app.knobs

Class MainKnobGroup

    • Constructor Detail

      • MainKnobGroup

        public MainKnobGroup()
        Constructor
      • MainKnobGroup

        public MainKnobGroup​(List<Knob> knobs)
        Primary constructor
        Parameters:
        knobs - The list of knobs in this main group.
    • Method Detail

      • getKnobWithID

        public Knob getKnobWithID​(long ID)
        Get the knob with the specified ID
        Parameters:
        ID - The ID of the knob to get
        Returns:
        The knob with the specified ID
      • dataLabel

        public String dataLabel()
        dataLabel() provides the name used to identify the class in an external data source.
        Specified by:
        dataLabel in interface xal.tools.data.DataListener
        Overrides:
        dataLabel in class KnobGroup
        Returns:
        The tag for this data node.
      • update

        public void update​(xal.tools.data.DataAdaptor adaptor)
        Instructs the receiver to update its data based on the given adaptor.
        Specified by:
        update in interface xal.tools.data.DataListener
        Overrides:
        update in class KnobGroup
        Parameters:
        adaptor - The data adaptor corresponding to this object's data node.
      • write

        public void write​(xal.tools.data.DataAdaptor adaptor)
        Instructs the receiver to write its data to the adaptor for external storage.
        Specified by:
        write in interface xal.tools.data.DataListener
        Overrides:
        write in class KnobGroup
        Parameters:
        adaptor - The data adaptor corresponding to this object's data node.
      • sortKnobs

        protected void sortKnobs()
        Sort the knobs alphabetically
        Overrides:
        sortKnobs in class KnobGroup
      • setLabel

        public void setLabel​(String label)
        This method overrides the superclass to do nothing since one cannot edit the main group.
        Overrides:
        setLabel in class KnobGroup
        Parameters:
        label - The new label
      • allowsLabelEdit

        public boolean allowsLabelEdit()
        Determine if the group allows editing of its label. The MainGroup does not allow editing of its label.
        Overrides:
        allowsLabelEdit in class KnobGroup
        Returns:
        false
      • compareTo

        public int compareTo​(KnobGroup group)
        Compare two instances. The main group always appears ahead of other groups.
        Specified by:
        compareTo in interface Comparable<KnobGroup>
        Overrides:
        compareTo in class KnobGroup
        Parameters:
        group - the other group against which to compare
        Returns:
        a positive number if this comes after the argument, negative if this comes before and 0 if they are equal
        See Also:
        KnobGroup.getLabel()