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 SummaryConstructors
- 
Method SummaryModifier 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.RMObjectaddPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange, toStringMethods inherited from class com.inductiveautomation.rm.base.RMListenerListaddListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
- 
Constructor Details- 
RMGrouperpublic RMGrouper()Creates an empty grouper.
 
- 
- 
Method Details- 
getGroupingCountpublic int getGroupingCount()Returns the number of groupings in this grouper.
- 
getGroupingReturns the grouping at the given index.
- 
addGroupingAdds a given grouping to grouper's list of groupings.
- 
addGroupingAdds a given grouping to grouper's list of groupings.
- 
removeGroupingRemoves the grouping at the given index.
- 
getGroupingReturns the grouping with the given key.
- 
getGroupingLastReturns the last grouping.
- 
getGroupingKeyReturn the key for the grouping at the given index.
- 
indexOfReturns the index for the grouping with the given key.
- 
addGroupingsAdds a given list of groupings to grouper's list of groupings.
- 
addGroupingForKeyAdds a new grouping with the given key.
- 
addGroupingForKeyAdds a new grouping with the given key at the given index.
- 
removeGroupingRemoves the given grouping.
- 
moveGroupingpublic void moveGrouping(int fromIndex, int toIndex) Moves a grouping from given fromIndex to given toIndex.
- 
getSelectedGroupingIndexpublic int getSelectedGroupingIndex()Returns the currently selected grouping's index (for editing, mostly).
- 
setSelectedGroupingIndexpublic void setSelectedGroupingIndex(int anIndex) Sets the currently selected grouping by index (for editing, mostly).
- 
getSelectedGroupingReturns the currently selected grouping (while editing only).
- 
groupObjectsSeparates given objects into RMGroups defined by groupings.
- 
propertyChangeListen for property changes and forward to grouper's property change listeners.- Specified by:
- propertyChangein interface- PropertyChangeListener
 
- 
equalsStandard equals implementation.
- 
cloneStandard clone implementation.- Overrides:
- clonein class- RMListenerList
 
- 
toXMLXML archival.- Specified by:
- toXMLin interface- Archivable
 
- 
fromXMLXML unarchival.- Specified by:
- fromXMLin interface- Archivable
 
 
-