|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--sos.reports.AbstractReportSelectionModel
|
+--sos.reports.CompositeReportSelectionModel
A report selection model that combines a number of selection models into one. It gives precedence first to the model handling the selection and then to the list of selection models (in the order they were added).
TierReportSelectionModel,
CellReportSelectionModel,
TemplateReportSelectionModel| Constructor Summary | |
CompositeReportSelectionModel()
Creates an empty CompositeReportSelectionModel. |
|
CompositeReportSelectionModel(java.util.List selectionModels)
Creates a CompositeReportSelectionModel with the specified array
of selection models. |
|
CompositeReportSelectionModel(ReportSelectionModel[] selectionModels)
Creates a CompositeReportSelectionModel with the specified array
of selection models. |
|
| Method Summary | |
void |
addSelectionModel(ReportSelectionModel selectionModel)
Appends the specified selection model to this model's collection. |
boolean |
canSelect(Element element,
boolean toggle,
boolean extend)
Returns true if the specified element is selectable given the current selection and the state of toggle and extend. |
void |
clearSelection()
Clears the current selection, if any. |
Element |
getAnchorSelectionElement()
Returns the element passed to the last successful invocation of select
with the extend paramter set to false. |
Element |
getLeadSelectionElement()
Returns the element passed to the last successful invocation of select. |
java.util.Set |
getSelectedElements()
Returns the set of selected elements. |
boolean |
isSelected(Element element)
Returns true if the specified element is selected. |
void |
removeSelectionModel(ReportSelectionModel selectionModel)
Removes the specified selection model from this model's collection. |
void |
reportChanged(ReportEvent event)
Updates itself (if necessary) as a result of a report modification. |
void |
select(Element element,
boolean toggle,
boolean extend)
Changes the selection. |
void |
setAnchorSelectionElement(Element element)
Sets the anchor selection element. |
void |
setLeadSelectionElement(Element element)
Sets the lead selection element. |
void |
setSelectedElements(java.util.Set elements)
Sets the selection to the report elements in the specified set. |
| Methods inherited from class sos.reports.AbstractReportSelectionModel |
addReportSelectionListener, fireSelectionChanged, fireSelectionChanged, fireSelectionChanged, getValueIsAdjusting, removeReportSelectionListener, setValueIsAdjusting |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface sos.reports.ReportSelectionModel |
addReportSelectionListener, getValueIsAdjusting, removeReportSelectionListener, setValueIsAdjusting |
| Constructor Detail |
public CompositeReportSelectionModel()
CompositeReportSelectionModel. Use
addSelectionModel to add selection models.
CompositeReportSelectionModel(ReportSelectionModel[]),
CompositeReportSelectionModel(List),
addSelectionModel(sos.reports.ReportSelectionModel)public CompositeReportSelectionModel(ReportSelectionModel[] selectionModels)
CompositeReportSelectionModel with the specified array
of selection models.
selectionModels - initial selection models
java.lang.NullPointerException - if selectionModels is null
or any element of the array is nullCompositeReportSelectionModel(List)public CompositeReportSelectionModel(java.util.List selectionModels)
CompositeReportSelectionModel with the specified array
of selection models.
selectionModels - initial selection models
java.lang.ClassCastException - if any element of the list is not an instance
of ReportSelectionModel
java.lang.NullPointerException - if selectionModels is nullCompositeReportSelectionModel(List)| Method Detail |
public void addSelectionModel(ReportSelectionModel selectionModel)
selectionModel - selection model to add to this model's collection
java.lang.NullPointerException - if selectionModel is nullremoveSelectionModel(sos.reports.ReportSelectionModel)
public boolean canSelect(Element element,
boolean toggle,
boolean extend)
ReportSelectionModeltoggle and extend.
A subsequent call to select with the same arguments will
throw a NotSelectableException if and only if this invocation returns
false.
canSelect in interface ReportSelectionModelelement - report element on which the selection change is madetoggle - whether or not the selection should be toggledextend - whether or not the selection should be extended to include
the specified element
true if the selection can succeedReportSelectionModel.select(sos.reports.Element, boolean, boolean)public void clearSelection()
ReportSelectionModelgetSelectedElements will return an empty set.
clearSelection in interface ReportSelectionModelpublic Element getAnchorSelectionElement()
ReportSelectionModelselect
with the extend paramter set to false.
getAnchorSelectionElement in interface ReportSelectionModelselect
with the extend paramter set to falsepublic Element getLeadSelectionElement()
ReportSelectionModelselect.
getLeadSelectionElement in interface ReportSelectionModelselectpublic java.util.Set getSelectedElements()
ReportSelectionModel
getSelectedElements in interface ReportSelectionModelpublic boolean isSelected(Element element)
ReportSelectionModeltrue if the specified element is selected.
isSelected in interface ReportSelectionModelelement - report element in question
true if element is in the selectionpublic void removeSelectionModel(ReportSelectionModel selectionModel)
selectionModel currently holds the selection, the selection
is cleared.
selectionModel - selection model to remove from this model's collection
java.lang.NullPointerException - if selectionModel is nulladdSelectionModel(sos.reports.ReportSelectionModel)public void reportChanged(ReportEvent event)
ReportSelectionModel
reportChanged in interface ReportSelectionModelreportChanged in class AbstractReportSelectionModelevent - the event describing how the report has changed
public void select(Element element,
boolean toggle,
boolean extend)
throws NotSelectableException
ReportSelectionModel
select in interface ReportSelectionModelelement - report element on which the selection change is madetoggle - whether or not the selection should be toggledextend - whether or not the selection should be extended to include
the specified element
NotSelectableException - if the action cannot be carried out because
one or more of the needed report elements are not selectableReportSelectionModel.canSelect(sos.reports.Element, boolean, boolean)
public void setAnchorSelectionElement(Element element)
throws NotSelectableException
ReportSelectionModel
setAnchorSelectionElement in interface ReportSelectionModelelement - report element to use as the anchor
NotSelectableException - if element is not selectableReportSelectionModel.getAnchorSelectionElement()
public void setLeadSelectionElement(Element element)
throws NotSelectableException
ReportSelectionModel
setLeadSelectionElement in interface ReportSelectionModelelement - report element to use as the lead anchor
NotSelectableException - if element is not selectableReportSelectionModel.getLeadSelectionElement()
public void setSelectedElements(java.util.Set elements)
throws NotSelectableException
ReportSelectionModel
setSelectedElements in interface ReportSelectionModelelements - report elements to be selected
NotSelectableException - if any element in the set is not selectable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||