|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--sos.reports.AbstractReportSelectionModel
|
+--sos.reports.TemplateReportSelectionModel
A report selection model that bases the selection model on the name of the report template.
TierReportSelectionModel,
CellReportSelectionModel,
CompositeReportSelectionModel| Constructor Summary | |
TemplateReportSelectionModel()
Creates an empty TemplateReportSelectionModel. |
|
TemplateReportSelectionModel(java.lang.String templateName,
ReportSelectionModel selectionModel)
Creates an instance of TemplateReportSelectionModel with an
initial selection model mapping. |
|
| Method Summary | |
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 |
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. |
void |
setTemplateSelectionModel(java.lang.String templateName,
ReportSelectionModel selectionModel)
Associates the specified selection model to the specified template name. |
| 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 TemplateReportSelectionModel()
TemplateReportSelectionModel. Use
setTemplateSelectionModel to add selection models.
TemplateReportSelectionModel(String,ReportSelectionModel),
setTemplateSelectionModel(java.lang.String, sos.reports.ReportSelectionModel)
public TemplateReportSelectionModel(java.lang.String templateName,
ReportSelectionModel selectionModel)
TemplateReportSelectionModel with an
initial selection model mapping.
templateName - name of the template for which to use selectionModelselectionModel - selection model to use if an element corresponding
to a report generated by a template named templateName is being selected| Method Detail |
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 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 setTemplateSelectionModel(java.lang.String templateName,
ReportSelectionModel selectionModel)
templateName, this selection model
will use selectionModel. A null selectionModel
unassociates any selection model from the template name.
templateName - name of the template for which to use selectionModelselectionModel - selection model to use if an element corresponding
to a report generated by a template named templateName is being selected
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 | |||||||||