sos.reports
Interface TraversalPolicy


public interface TraversalPolicy

An object that specifies the order in which report elements should be visited. This traversal policy typically controls how the "Tab" key behaves. Typically, a forward traversal will visit every report element exactly once, and a backward traversal will visit the same elements in the reverse order. The installed ReportEditorKit may choose to ignore certain elements (e.g. if the element is not selectable).

Since:
1.0

Method Summary
 Element getElementAfter(Element element)
          Returns the element after the specified element in a traversal.
 Element getElementBefore(Element element)
          Returns the element before the specified element in a traversal.
 Element getFirstElement(Report report)
          Returns the starting point of a report traversal.
 Element getLastElement(Report report)
          Returns the ending point of a report traversal.
 

Method Detail

getFirstElement

public Element getFirstElement(Report report)
Returns the starting point of a report traversal.

An implementation will generally use Report.getRootElement to retrieve the root element and then use methods in the appropriate subclass of Element to navigate to the desired Element.

Parameters:
report - the report to traverse
Returns:
the element at which a traversal starts, or null if no such element exists
Throws:
java.lang.NullPointerException - if report is null
See Also:
getLastElement(sos.reports.Report), Report.getRootElement()

getLastElement

public Element getLastElement(Report report)
Returns the ending point of a report traversal.

An implementation will generally use Report.getRootElement to retrieve the root element and then use methods in the appropriate subclass of Element to navigate to the desired Element.

Parameters:
report - the report to traverse
Returns:
the element at which a traversal ends, or null if no such element exists
Throws:
java.lang.NullPointerException - if reportPane is null
See Also:
getFirstElement(sos.reports.Report), Report.getRootElement()

getElementAfter

public Element getElementAfter(Element element)
Returns the element after the specified element in a traversal.

Parameters:
element - element for which to return the subsequent element
Returns:
the element following element in a traversal, or null if no such element exists
Throws:
java.lang.NullPointerException - if element is null
See Also:
getElementBefore(sos.reports.Element)

getElementBefore

public Element getElementBefore(Element element)
Returns the element before the specified element in a traversal.

Parameters:
element - element for which to return the preceding element
Returns:
the element preceding element in a traversal, or null if no such element exists
Throws:
java.lang.NullPointerException - if element is null
See Also:
getElementAfter(sos.reports.Element)


Copyright 2003, 2004 Side of Software (SOS). All rights reserved.