com.dlsc.flexgantt.swing.layer
Interface ILayerContainerSelectionModel

All Known Implementing Classes:
DefaultLayerContainerSelectionModel

public interface ILayerContainerSelectionModel

A selection model used by the layer container to manage the selection of time spans.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
LayerContainer.setSelectionModel(ILayerContainerSelectionModel), LayerContainer.getSelectionModel(), ILayerContainerSelectionModelListener

Method Summary
 void addLayerContainerSelectionModelListener(ILayerContainerSelectionModelListener l)
          Adds a listener to the selection model.
 void addSelectedTimeSpan(java.lang.Object node, ITimeSpan span)
          Adds a time span to the list of selected time spans of the given tree table node object.
 void clearSelectedTimeSpans()
          Removes all selected time spans from the selection model.
 void clearSelectedTimeSpans(java.lang.Object node)
          Removes all of those selected time spans that belong to the given tree node object.
 java.util.Iterator<ITimeSpan> getSelectedTimeSpans(java.lang.Object node, ITimeSpan span)
          Returns an iterator for iterating over the list of selected time spans of the given node within the given time span.
 boolean isEmpty()
          Checks whether the selection model contains any selections at all.
 boolean isEmpty(java.lang.Object node)
          Checks whether the selection model contains any selections for the given tree node object.
 boolean isSelected(java.lang.Object node, ITimeSpan span)
          Returns TRUE if the given time span is currently selected on the given tree table node.
 void removeLayerContainerSelectionModelListener(ILayerContainerSelectionModelListener l)
          Removes a listener from the selection model.
 void removeSelectedTimeSpan(java.lang.Object node, ITimeSpan span)
          Removes a time span from the list of selected time spans of the given tree table node object.
 

Method Detail

isEmpty

boolean isEmpty()
Checks whether the selection model contains any selections at all.

Returns:
TRUE if the selection model does not have any selections
Since:
1.0

isEmpty

boolean isEmpty(java.lang.Object node)
Checks whether the selection model contains any selections for the given tree node object.

Parameters:
node - the node to check for selections
Returns:
TRUE if the selection model does not have any selections for the given tree node object
Since:
1.0

clearSelectedTimeSpans

void clearSelectedTimeSpans()
Removes all selected time spans from the selection model.

Since:
1.0
See Also:
clearSelectedTimeSpans(Object), removeSelectedTimeSpan(Object, ITimeSpan)

clearSelectedTimeSpans

void clearSelectedTimeSpans(java.lang.Object node)
Removes all of those selected time spans that belong to the given tree node object.

Parameters:
node - the tree table node object
Since:
1.0
See Also:
clearSelectedTimeSpans(), removeSelectedTimeSpan(Object, ITimeSpan)

addSelectedTimeSpan

void addSelectedTimeSpan(java.lang.Object node,
                         ITimeSpan span)
Adds a time span to the list of selected time spans of the given tree table node object.

Parameters:
node - the tree table node object
span - the time span to add
Since:
1.0
See Also:
removeSelectedTimeSpan(Object, ITimeSpan)

removeSelectedTimeSpan

void removeSelectedTimeSpan(java.lang.Object node,
                            ITimeSpan span)
Removes a time span from the list of selected time spans of the given tree table node object.

Parameters:
node - the tree table node object
span - the time span to remove
Since:
1.0
See Also:
addSelectedTimeSpan(Object, ITimeSpan)

getSelectedTimeSpans

java.util.Iterator<ITimeSpan> getSelectedTimeSpans(java.lang.Object node,
                                                   ITimeSpan span)
Returns an iterator for iterating over the list of selected time spans of the given node within the given time span.

Parameters:
node - the tree table node object
span - the time span for which an iterator gets created
Returns:
a time span iterator
Since:
1.0

isSelected

boolean isSelected(java.lang.Object node,
                   ITimeSpan span)
Returns TRUE if the given time span is currently selected on the given tree table node. A time span is considered selected if it is completely contained within one of the selected time spans.

Parameters:
node - the tree table node object
span - the time span to check
Returns:
TRUE if the time span is currently selected
Since:
1.0
See Also:
ITimeSpan.contains(ITimeSpan)

addLayerContainerSelectionModelListener

void addLayerContainerSelectionModelListener(ILayerContainerSelectionModelListener l)
Adds a listener to the selection model.

Parameters:
l - the listener to add
Since:
1.0
See Also:
removeLayerContainerSelectionModelListener(ILayerContainerSelectionModelListener)

removeLayerContainerSelectionModelListener

void removeLayerContainerSelectionModelListener(ILayerContainerSelectionModelListener l)
Removes a listener from the selection model.

Parameters:
l - the listener to remove
Since:
1.0
See Also:
addLayerContainerSelectionModelListener(ILayerContainerSelectionModelListener)