Package xal.app.knobs
Class MainKnobGroup
- java.lang.Object
-
- xal.app.knobs.KnobGroup
-
- xal.app.knobs.MainKnobGroup
-
- All Implemented Interfaces:
Comparable<KnobGroup>,KnobListener,xal.tools.data.DataListener
public class MainKnobGroup extends KnobGroup
Main group for holding all knobs
-
-
Field Summary
Fields Modifier and Type Field Description static StringDATA_LABELThe DataAdaptor label for reading and writing the main groupstatic StringLABELThe label for this group-
Fields inherited from class xal.app.knobs.KnobGroup
_knobs, _label, EVENT_PROXY, MESSAGE_CENTER
-
-
Constructor Summary
Constructors Constructor Description MainKnobGroup()ConstructorMainKnobGroup(List<Knob> knobs)Primary constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowsLabelEdit()Determine if the group allows editing of its label.intcompareTo(KnobGroup group)Compare two instances.StringdataLabel()dataLabel() provides the name used to identify the class in an external data source.KnobgetKnobWithID(long ID)Get the knob with the specified IDvoidsetLabel(String label)This method overrides the superclass to do nothing since one cannot edit the main group.protected voidsortKnobs()Sort the knobs alphabeticallyvoidupdate(xal.tools.data.DataAdaptor adaptor)Instructs the receiver to update its data based on the given adaptor.voidwrite(xal.tools.data.DataAdaptor adaptor)Instructs the receiver to write its data to the adaptor for external storage.-
Methods inherited from class xal.app.knobs.KnobGroup
addKnob, addKnobGroupListener, addKnobs, contains, currentSettingChanged, elementAdded, elementModified, elementRemoved, getKnob, getKnobCount, getKnobs, getLabel, limitsChanged, nameChanged, readyStateChanged, removeKnob, removeKnobGroupListener, removeKnobs, toString, valueSettingPublished
-
-
-
-
Field Detail
-
LABEL
public static final String LABEL
The label for this group- See Also:
- Constant Field Values
-
DATA_LABEL
public static final String DATA_LABEL
The DataAdaptor label for reading and writing the main group- See Also:
- Constant Field Values
-
-
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.
-
update
public void update(xal.tools.data.DataAdaptor adaptor)
Instructs the receiver to update its data based on the given adaptor.
-
write
public void write(xal.tools.data.DataAdaptor adaptor)
Instructs the receiver to write its data to the adaptor for external storage.
-
sortKnobs
protected void sortKnobs()
Sort the knobs alphabetically
-
setLabel
public void setLabel(String label)
This method overrides the superclass to do nothing since one cannot edit the main group.
-
allowsLabelEdit
public boolean allowsLabelEdit()
Determine if the group allows editing of its label. The MainGroup does not allow editing of its label.- Overrides:
allowsLabelEditin classKnobGroup- Returns:
- false
-
compareTo
public int compareTo(KnobGroup group)
Compare two instances. The main group always appears ahead of other groups.- Specified by:
compareToin interfaceComparable<KnobGroup>- Overrides:
compareToin classKnobGroup- 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()
-
-