org.geworkbench.bison.datastructure.complex.panels
Interface DSPanel<T extends DSNamed>

All Superinterfaces:
java.util.Collection<T>, DSDescribable, DSIdentifiable, DSItemList<T>, DSNamed, DSSequential, java.lang.Iterable<T>, java.util.List<T>, java.io.Serializable
All Known Subinterfaces:
DSAnnotatedPanel<T,U>
All Known Implementing Classes:
CSAnnotPanel, CSPanel

public interface DSPanel<T extends DSNamed>
extends DSItemList<T>, DSNamed, DSIdentifiable, DSDescribable, java.io.Serializable, DSSequential

Implementing classes are activatable/deactivatable item lists.


Method Summary
 DSPanel<T> activeSubset()
          Gets all the active sub-panels of the panel.
 int getNumberOfProperItems()
          Gets the number of proper items in this panel.
 DSPanel<T> getPanel(T item)
          Gets the sub-panel that contains the given item.
 T getProperItem(int index)
          Gets a proper item by index.
 DSPanel<T> getSelection()
          Gets the selected sub-panel.
 java.lang.String getSubLabel()
          Gets the sub-label for this DSPanel.
 boolean isActive()
          Active panels are used by the visual displays.
 boolean isBoundary(int index)
          Used to determine if the current index is a sub-panel boundary
 DSItemList<DSPanel<T>> panels()
          Gets all the sub-panels of the panel.
 void setActive(boolean flag)
          Active panels are used by the visual displays.
 void setSubLabel(java.lang.String label)
          Sets the sub-label for this DSPanel.
 java.lang.String toString()
          returns a string representation of the panel
 
Methods inherited from interface org.geworkbench.bison.datastructure.complex.panels.DSItemList
get
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 
Methods inherited from interface org.geworkbench.bison.datastructure.properties.DSIdentifiable
getID, setID
 
Methods inherited from interface org.geworkbench.bison.datastructure.properties.DSDescribable
getDescription, setDescription
 
Methods inherited from interface org.geworkbench.bison.datastructure.properties.DSSequential
getSerial, setSerial
 
Methods inherited from interface org.geworkbench.bison.datastructure.properties.DSNamed
getLabel, setLabel
 

Method Detail

getSubLabel

java.lang.String getSubLabel()
Gets the sub-label for this DSPanel.

Returns:
the sub-label.

setSubLabel

void setSubLabel(java.lang.String label)
Sets the sub-label for this DSPanel.

Parameters:
label - the new sub-label.

toString

java.lang.String toString()
returns a string representation of the panel

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the panel

setActive

void setActive(boolean flag)
Active panels are used by the visual displays. Inactive ones are ignored Sets the active state of this panel


isActive

boolean isActive()
Active panels are used by the visual displays. Inactive ones are ignored

Returns:
the active state of this panel

panels

DSItemList<DSPanel<T>> panels()
Gets all the sub-panels of the panel.

Returns:
the panels contained by this panel.

activeSubset

DSPanel<T> activeSubset()
Gets all the active sub-panels of the panel.

Returns:
the active panels contained by this panel.

getPanel

DSPanel<T> getPanel(T item)
Gets the sub-panel that contains the given item.

Parameters:
item - the item to search for in the sub-panels.
Returns:
the containing sub-panel, or null if the item was not found.

getSelection

DSPanel<T> getSelection()
Gets the selected sub-panel.

Returns:
the selected sub-panel, or null if no panel is selected.

isBoundary

boolean isBoundary(int index)
Used to determine if the current index is a sub-panel boundary

Parameters:
index - int
Returns:
boolean

getProperItem

T getProperItem(int index)
Gets a proper item by index. A proper item is an item that belongs to this panel but not to its subpanels.


getNumberOfProperItems

int getNumberOfProperItems()
Gets the number of proper items in this panel. A proper item is an item that belongs to this panel but not to its subpanels.