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,- java.beans.PropertyChangeListener,- java.lang.Cloneable,- java.util.EventListener
 
 public class RMGrouper extends RMObject implements java.beans.PropertyChangeListener, Archivable This class simply manages a list of groupings and has some nice convenience methods.
- 
- 
Constructor SummaryConstructors Constructor Description RMGrouper()Creates an empty grouper.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGrouping(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.RMGroupingaddGroupingForKey(java.lang.String aKey)Adds a new grouping with the given key.RMGroupingaddGroupingForKey(java.lang.String aKey, int anIndex)Adds a new grouping with the given key at the given index.voidaddGroupings(java.util.List<RMGrouping> aList)Adds a given list of groupings to grouper's list of groupings.RMGrouperclone()Standard clone implementation.booleanequals(java.lang.Object anObj)Standard equals implementation.java.lang.ObjectfromXML(RXArchiver anArchiver, RXElement anElement)XML unarchival.RMGroupinggetGrouping(int anIndex)Returns the grouping at the given index.RMGroupinggetGrouping(java.lang.String aKey)Returns the grouping with the given key.intgetGroupingCount()Returns the number of groupings in this grouper.java.lang.StringgetGroupingKey(int anIndex)Return the key for the grouping at the given index.RMGroupinggetGroupingLast()Returns the last grouping.RMGroupinggetSelectedGrouping()Returns the currently selected grouping (while editing only).intgetSelectedGroupingIndex()Returns the currently selected grouping's index (for editing, mostly).RMGroupgroupObjects(java.util.List aList)Separates given objects into RMGroups defined by groupings.intindexOf(java.lang.String aKey)Returns the index for the grouping with the given key.voidmoveGrouping(int fromIndex, int toIndex)Moves a grouping from given fromIndex to given toIndex.voidpropertyChange(java.beans.PropertyChangeEvent anEvent)Listen for property changes and forward to grouper's property change listeners.RMGroupingremoveGrouping(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).RXElementtoXML(RXArchiver anArchiver)XML archival.- 
Methods inherited from class com.inductiveautomation.rm.base.RMObjectaddPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange, toString
 - 
Methods inherited from class com.inductiveautomation.rm.base.RMListenerListaddListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
 
- 
 
- 
- 
- 
Method Detail- 
getGroupingCountpublic int getGroupingCount() Returns the number of groupings in this grouper.
 - 
getGroupingpublic RMGrouping getGrouping(int anIndex) Returns the grouping at the given index.
 - 
addGroupingpublic void addGrouping(RMGrouping aGrouping) Adds a given grouping to grouper's list of groupings.
 - 
addGroupingpublic void addGrouping(RMGrouping aGrouping, int anIndex) Adds a given grouping to grouper's list of groupings.
 - 
removeGroupingpublic RMGrouping removeGrouping(int anIndex) Removes the grouping at the given index.
 - 
getGroupingpublic RMGrouping getGrouping(java.lang.String aKey) Returns the grouping with the given key.
 - 
getGroupingLastpublic RMGrouping getGroupingLast() Returns the last grouping.
 - 
getGroupingKeypublic java.lang.String getGroupingKey(int anIndex) Return the key for the grouping at the given index.
 - 
indexOfpublic int indexOf(java.lang.String aKey) Returns the index for the grouping with the given key.
 - 
addGroupingspublic void addGroupings(java.util.List<RMGrouping> aList) Adds a given list of groupings to grouper's list of groupings.
 - 
addGroupingForKeypublic RMGrouping addGroupingForKey(java.lang.String aKey) Adds a new grouping with the given key.
 - 
addGroupingForKeypublic RMGrouping addGroupingForKey(java.lang.String aKey, int anIndex) Adds a new grouping with the given key at the given index.
 - 
removeGroupingpublic boolean removeGrouping(RMGrouping aGrouping) Removes 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).
 - 
getSelectedGroupingpublic RMGrouping getSelectedGrouping() Returns the currently selected grouping (while editing only).
 - 
groupObjectspublic RMGroup groupObjects(java.util.List aList) Separates given objects into RMGroups defined by groupings.
 - 
propertyChangepublic void propertyChange(java.beans.PropertyChangeEvent anEvent) Listen for property changes and forward to grouper's property change listeners.- Specified by:
- propertyChangein interface- java.beans.PropertyChangeListener
 
 - 
equalspublic boolean equals(java.lang.Object anObj) Standard equals implementation.- Overrides:
- equalsin class- java.lang.Object
 
 - 
clonepublic RMGrouper clone() Standard clone implementation.- Overrides:
- clonein class- RMListenerList
 
 - 
toXMLpublic RXElement toXML(RXArchiver anArchiver) XML archival.- Specified by:
- toXMLin interface- Archivable
 
 - 
fromXMLpublic java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.- Specified by:
- fromXMLin interface- Archivable
 
 
- 
 
-