|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The interface to selecting report elements.
JReportPane.getSelectionModel()| Method Summary | |
void |
addReportSelectionListener(ReportSelectionListener listener)
Registers the specified listener so that it is notified when the selection changes. |
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 |
getValueIsAdjusting()
Returns true if the selection is undergoing a series of changes. |
boolean |
isSelected(Element element)
Returns true if the specified element is selected. |
void |
removeReportSelectionListener(ReportSelectionListener listener)
Unregisters the specified listener so that it is not notified when the selection changes. |
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 |
setValueIsAdjusting(boolean isAdjusting)
Sets whether or not the selection is about to undergo changes. |
| Method Detail |
public void addReportSelectionListener(ReportSelectionListener listener)
listener - object to be notified when a change in the selection occurspublic void clearSelection()
getSelectedElements will return an empty set.
public Element getLeadSelectionElement()
select.
selectpublic Element getAnchorSelectionElement()
select
with the extend paramter set to false.
select
with the extend paramter set to falsepublic java.util.Set getSelectedElements()
public boolean getValueIsAdjusting()
true if the selection is undergoing a series of changes.
true if the selection is currently adjustingsetValueIsAdjusting(boolean)
public boolean canSelect(Element element,
boolean toggle,
boolean extend)
toggle and extend.
A subsequent call to select with the same arguments will
throw a NotSelectableException if and only if this invocation returns
false.
element - 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 succeed
java.lang.NullPointerException - if element is nullselect(sos.reports.Element, boolean, boolean)public boolean isSelected(Element element)
true if the specified element is selected.
element - report element in question
true if element is in the selectionpublic void removeReportSelectionListener(ReportSelectionListener listener)
listener - object that does not wish to be notified
when a change in the selection occurspublic void reportChanged(ReportEvent event)
event - the event describing how the report has changed
public void select(Element element,
boolean toggle,
boolean extend)
throws NotSelectableException
element - 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 selectable
java.lang.NullPointerException - if element is nullcanSelect(sos.reports.Element, boolean, boolean)
public void setAnchorSelectionElement(Element element)
throws NotSelectableException
element - report element to use as the anchor
NotSelectableException - if element is not selectable
java.lang.NullPointerException - if element is nullgetAnchorSelectionElement()
public void setLeadSelectionElement(Element element)
throws NotSelectableException
element - report element to use as the lead anchor
NotSelectableException - if element is not selectable
java.lang.NullPointerException - if element is nullgetLeadSelectionElement()
public void setSelectedElements(java.util.Set elements)
throws NotSelectableException
elements - report elements to be selected
java.lang.ClassCastException - if any element in the set is not an
instance of Element
NotSelectableException - if any element in the set is not selectable
java.lang.NullPointerException - if elements is null
or any element in the set is nullpublic void setValueIsAdjusting(boolean isAdjusting)
isAdjusting - true if a series of changes is about to take placegetValueIsAdjusting()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||