Package com.inductiveautomation.rm.base
Class RMGrouper
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.rm.base.RMGrouper
- All Implemented Interfaces:
Archivable,RMPropertyChanger,PropertyChangeListener,Cloneable,EventListener
This class simply manages a list of groupings and has some nice convenience methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGrouping(RMGrouping aGrouping) Adds a given grouping to grouper's list of groupings.voidaddGrouping(RMGrouping aGrouping, int anIndex) Adds a given grouping to grouper's list of groupings.addGroupingForKey(String aKey) Adds a new grouping with the given key.addGroupingForKey(String aKey, int anIndex) Adds a new grouping with the given key at the given index.voidaddGroupings(List<RMGrouping> aList) Adds a given list of groupings to grouper's list of groupings.clone()Standard clone implementation.booleanStandard equals implementation.fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.getGrouping(int anIndex) Returns the grouping at the given index.getGrouping(String aKey) Returns the grouping with the given key.intReturns the number of groupings in this grouper.getGroupingKey(int anIndex) Return the key for the grouping at the given index.Returns the last grouping.Returns the currently selected grouping (while editing only).intReturns the currently selected grouping's index (for editing, mostly).groupObjects(List aList) Separates given objects into RMGroups defined by groupings.intReturns the index for the grouping with the given key.voidmoveGrouping(int fromIndex, int toIndex) Moves a grouping from given fromIndex to given toIndex.voidpropertyChange(PropertyChangeEvent anEvent) Listen for property changes and forward to grouper's property change listeners.removeGrouping(int anIndex) Removes the grouping at the given index.booleanremoveGrouping(RMGrouping aGrouping) Removes the given grouping.voidsetSelectedGroupingIndex(int anIndex) Sets the currently selected grouping by index (for editing, mostly).toXML(RXArchiver anArchiver) XML archival.Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange, toStringMethods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
Constructor Details
-
RMGrouper
public RMGrouper()Creates an empty grouper.
-
-
Method Details
-
getGroupingCount
public int getGroupingCount()Returns the number of groupings in this grouper. -
getGrouping
Returns the grouping at the given index. -
addGrouping
Adds a given grouping to grouper's list of groupings. -
addGrouping
Adds a given grouping to grouper's list of groupings. -
removeGrouping
Removes the grouping at the given index. -
getGrouping
Returns the grouping with the given key. -
getGroupingLast
Returns the last grouping. -
getGroupingKey
Return the key for the grouping at the given index. -
indexOf
Returns the index for the grouping with the given key. -
addGroupings
Adds a given list of groupings to grouper's list of groupings. -
addGroupingForKey
Adds a new grouping with the given key. -
addGroupingForKey
Adds a new grouping with the given key at the given index. -
removeGrouping
Removes the given grouping. -
moveGrouping
public void moveGrouping(int fromIndex, int toIndex) Moves a grouping from given fromIndex to given toIndex. -
getSelectedGroupingIndex
public int getSelectedGroupingIndex()Returns the currently selected grouping's index (for editing, mostly). -
setSelectedGroupingIndex
public void setSelectedGroupingIndex(int anIndex) Sets the currently selected grouping by index (for editing, mostly). -
getSelectedGrouping
Returns the currently selected grouping (while editing only). -
groupObjects
Separates given objects into RMGroups defined by groupings. -
propertyChange
Listen for property changes and forward to grouper's property change listeners.- Specified by:
propertyChangein interfacePropertyChangeListener
-
equals
Standard equals implementation. -
clone
Standard clone implementation.- Overrides:
clonein classRMListenerList
-
toXML
XML archival.- Specified by:
toXMLin interfaceArchivable
-
fromXML
XML unarchival.- Specified by:
fromXMLin interfaceArchivable
-