Package com.inductiveautomation.rm.base
Class RMGrouping
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMListenerList
-
- com.inductiveautomation.rm.base.RMObject
-
- com.inductiveautomation.rm.base.RMGrouping
-
- All Implemented Interfaces:
Archivable
,RMPropertyChanger
,java.lang.Cloneable
public class RMGrouping extends RMObject implements Archivable
This object represents an individual grouping with attributes like key, sorts, topN sort, etc.
-
-
Constructor Summary
Constructors Constructor Description RMGrouping()
Creates an empty grouping.RMGrouping(java.lang.String aKey)
Creates a grouping with the given key.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RMGrouping
addSort(RMSort aSort)
Adds the given sort to the grouping.void
addSort(RMSort aSort, int anIndex)
Adds the given sort to the grouping.void
addSort(java.lang.String aSortKey)
Adds a sort to the grouping for the given sort key.void
addSorts(java.util.List<RMSort> aList)
Adds the list of sorts to the grouping.RMGrouping
clone()
Standard clone implementation.boolean
equals(java.lang.Object anObj)
Standard equals implementation.java.lang.Object
fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.boolean
getHasDetails()
Returns whether the grouping has a details.boolean
getHasHeader()
Returns whether the grouping has a header.boolean
getHasSummary()
Returns whether the grouping has a summary.boolean
getIncludeAllValues()
Returns whether the grouping includes all values.boolean
getIncludeValues()
Returns whether to include values explicitly provided.java.lang.String
getKey()
Returns the grouping key.RMSort
getSelectedSort()
Returns the currently selected grouping's sort (while editing only).int
getSelectedSortIndex()
Returns the currently selected grouping's currently selected sort (for editing, mostly).RMSort
getSort(int anIndex)
Returns the individual sort at the given index.int
getSortCount()
Returns the number of sorts in the grouping.boolean
getSortOnValues()
Returns whether to sort on values explicitly provided.java.util.List<RMSort>
getSorts()
Returns the groupings list of sorts.RMTopNSort
getTopNSort()
Returns the top N sort for the grouping.java.util.List
getValues()
Returns a list of explicit values for this grouping.java.lang.String
getValuesString()
Returns the values (in the form of comma separated keychain keys) explicitly defined to sort or to include.void
moveSort(int fromIndex, int toIndex)
Moves a sort from the source index to the destination index.void
removeAllSorts()
RMSort
removeSort(int anIndex)
Removes the sort at the given index.int
removeSort(RMSort aSort)
Removes the given sort from the grouping.void
setHasDetails(boolean aValue)
Sets whether the grouping has a details.void
setHasHeader(boolean aValue)
Sets whether the grouping has a header.void
setHasSummary(boolean aValue)
Sets whether the grouping has a summary.void
setIncludeAllValues(boolean aValue)
Sets whether the grouping includes all values.void
setIncludeValues(boolean aFlag)
Sets whether to include values explicitly provided.void
setKey(java.lang.String aValue)
Sets the grouping key.void
setSelectedSortIndex(int anIndex)
Sets the currently selected grouping's currently selected sort (for editing, mostly).void
setSortOnValues(boolean aFlag)
Sets whether to sort on values explicitly provided.void
setTopNSort(RMTopNSort aSort)
Sets the top N sort for the grouping.void
setValuesString(java.lang.String aString)
Sets the values (in the form of comma separated keychain keys) explicitly defined to sort or to include.java.lang.String
toString()
Returns string representation of grouping.RXElement
toXML(RXArchiver anArchiver)
XML Archival.-
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
-
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
-
-
-
Method Detail
-
getKey
public java.lang.String getKey()
Returns the grouping key.
-
setKey
public void setKey(java.lang.String aValue)
Sets the grouping key.
-
getSorts
public java.util.List<RMSort> getSorts()
Returns the groupings list of sorts.
-
getSortCount
public int getSortCount()
Returns the number of sorts in the grouping.
-
getSort
public RMSort getSort(int anIndex)
Returns the individual sort at the given index.
-
addSort
public RMGrouping addSort(RMSort aSort)
Adds the given sort to the grouping.
-
addSort
public void addSort(RMSort aSort, int anIndex)
Adds the given sort to the grouping.
-
removeSort
public RMSort removeSort(int anIndex)
Removes the sort at the given index.
-
removeAllSorts
public void removeAllSorts()
-
addSorts
public void addSorts(java.util.List<RMSort> aList)
Adds the list of sorts to the grouping.
-
addSort
public void addSort(java.lang.String aSortKey)
Adds a sort to the grouping for the given sort key.
-
removeSort
public int removeSort(RMSort aSort)
Removes the given sort from the grouping.
-
moveSort
public void moveSort(int fromIndex, int toIndex)
Moves a sort from the source index to the destination index.
-
getTopNSort
public RMTopNSort getTopNSort()
Returns the top N sort for the grouping.
-
setTopNSort
public void setTopNSort(RMTopNSort aSort)
Sets the top N sort for the grouping.
-
getIncludeAllValues
public boolean getIncludeAllValues()
Returns whether the grouping includes all values.
-
setIncludeAllValues
public void setIncludeAllValues(boolean aValue)
Sets whether the grouping includes all values.
-
getValuesString
public java.lang.String getValuesString()
Returns the values (in the form of comma separated keychain keys) explicitly defined to sort or to include.
-
setValuesString
public void setValuesString(java.lang.String aString)
Sets the values (in the form of comma separated keychain keys) explicitly defined to sort or to include.
-
getValues
public java.util.List getValues()
Returns a list of explicit values for this grouping.
-
getSortOnValues
public boolean getSortOnValues()
Returns whether to sort on values explicitly provided.
-
setSortOnValues
public void setSortOnValues(boolean aFlag)
Sets whether to sort on values explicitly provided.
-
getIncludeValues
public boolean getIncludeValues()
Returns whether to include values explicitly provided.
-
setIncludeValues
public void setIncludeValues(boolean aFlag)
Sets whether to include values explicitly provided.
-
getHasHeader
public boolean getHasHeader()
Returns whether the grouping has a header.
-
setHasHeader
public void setHasHeader(boolean aValue)
Sets whether the grouping has a header.
-
getHasDetails
public boolean getHasDetails()
Returns whether the grouping has a details.
-
setHasDetails
public void setHasDetails(boolean aValue)
Sets whether the grouping has a details.
-
getHasSummary
public boolean getHasSummary()
Returns whether the grouping has a summary.
-
setHasSummary
public void setHasSummary(boolean aValue)
Sets whether the grouping has a summary.
-
getSelectedSortIndex
public int getSelectedSortIndex()
Returns the currently selected grouping's currently selected sort (for editing, mostly).
-
setSelectedSortIndex
public void setSelectedSortIndex(int anIndex)
Sets the currently selected grouping's currently selected sort (for editing, mostly).
-
getSelectedSort
public RMSort getSelectedSort()
Returns the currently selected grouping's sort (while editing only).
-
equals
public boolean equals(java.lang.Object anObj)
Standard equals implementation.- Overrides:
equals
in classjava.lang.Object
-
clone
public RMGrouping clone()
Standard clone implementation.- Overrides:
clone
in classRMListenerList
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML Archival.- Specified by:
toXML
in interfaceArchivable
-
fromXML
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.- Specified by:
fromXML
in interfaceArchivable
-
-