com.dlsc.flexgantt.swing.layer.timeline
Interface ITimelineObjectLayerSelectionModel

All Known Implementing Classes:
DefaultTimelineObjectLayerSelectionModel

public interface ITimelineObjectLayerSelectionModel

A selection model definition used by instances of TimelineObjectLayer.

Since:
1.0
Author:
Dirk Lemmermann

Method Summary
 void addSelection(java.util.Collection<TimelineObjectPath> paths)
          Adds several timeline objects to the selection at the same time.
 void addSelection(TimelineObjectPath path)
          Adds a selection / a selected timeline object to the model.
 void addTimelineLayerSelectionModelListener(ITimelineObjectLayerSelectionListener l)
          Adds a listener to the model.
 void clearSelection()
          Clears the current selection.
 void clearSelection(javax.swing.tree.TreePath path)
          Clears the current selection for the given path (clears the selection within a specific row).
 java.util.Iterator<TimelineObjectPath> getSelection()
          Returns all timeline objects that are currently selected.
 java.util.Iterator<TimelineObjectPath> getSelection(javax.swing.tree.TreePath path)
          Returns all timeline objects for the given node that are currently selected.
 java.util.Iterator<TimelineObjectPath> getSelection(javax.swing.tree.TreePath path, ITimeSpan span)
          Returns all timeline objects for the given node and time span that are currently selected.
 java.util.Iterator<javax.swing.tree.TreePath> getSelectionPaths()
          Returns all tree paths that reference hierarchy objects on which a selection exists / on which timeline objects are selected.
 boolean isSelected(TimelineObjectPath path)
          Determines if the timeline object referenced by the given timeline object path is currently selected.
 void removeSelection(java.util.Collection<TimelineObjectPath> paths)
          Removes several timeline objects from the selection at the same time.
 void removeSelection(TimelineObjectPath path)
          Removes a selection / a selected timeline object from the model.
 void removeTimelineLayerSelectionModelListener(ITimelineObjectLayerSelectionListener l)
          Removes a listener from the model.
 

Method Detail

clearSelection

void clearSelection()
Clears the current selection. No timeline object will be marked as selected any more.

Since:
1.0

clearSelection

void clearSelection(javax.swing.tree.TreePath path)
Clears the current selection for the given path (clears the selection within a specific row).

Parameters:
path - the path to the hierarchy node for which the selection will be cleared
Since:
1.0

addSelection

void addSelection(TimelineObjectPath path)
Adds a selection / a selected timeline object to the model.

Parameters:
path - the path to the timeline object
Since:
1.0

addSelection

void addSelection(java.util.Collection<TimelineObjectPath> paths)
Adds several timeline objects to the selection at the same time.

Parameters:
paths - a collection of timeline object paths
Since:
1.0

removeSelection

void removeSelection(TimelineObjectPath path)
Removes a selection / a selected timeline object from the model.

Parameters:
path - the path to the timeline object
Since:
1.0

removeSelection

void removeSelection(java.util.Collection<TimelineObjectPath> paths)
Removes several timeline objects from the selection at the same time.

Parameters:
paths - a collection of timeline object paths
Since:
1.0

getSelection

java.util.Iterator<TimelineObjectPath> getSelection(javax.swing.tree.TreePath path,
                                                    ITimeSpan span)
Returns all timeline objects for the given node and time span that are currently selected. The method returns an Iterator in order to hide the actual data structure used to store the objects.

Parameters:
path - the path to the hierarchy node for which to return the selected timeline objects
span - the time span for which to return the selected timeline objects
Returns:
an iterator for iterating over the list of selected timeline objects for the given node and time span
Since:
1.0
See Also:
getSelection(), getSelection(TreePath)

getSelection

java.util.Iterator<TimelineObjectPath> getSelection(javax.swing.tree.TreePath path)
Returns all timeline objects for the given node that are currently selected. The method returns an Iterator in order to hide the actual data structure used to store the objects.

Parameters:
path - the path to the hierarchy node for which to return the selected timeline objects
Returns:
an iterator for iterating over the list of selected timeline objects for the given node and time span
Since:
1.0
See Also:
getSelection(TreePath, ITimeSpan), getSelection()

getSelection

java.util.Iterator<TimelineObjectPath> getSelection()
Returns all timeline objects that are currently selected. The method returns an Iterator in order to hide the actual data structure used to store the objects.

Returns:
an iterator for iterating over the list of selected timeline objects for the given node and time span
Since:
1.0
See Also:
getSelection(TreePath), getSelection(TreePath, ITimeSpan)

getSelectionPaths

java.util.Iterator<javax.swing.tree.TreePath> getSelectionPaths()
Returns all tree paths that reference hierarchy objects on which a selection exists / on which timeline objects are selected.

Returns:
all tree paths referencing hierarchy objects with selections
Since:
1.0

isSelected

boolean isSelected(TimelineObjectPath path)
Determines if the timeline object referenced by the given timeline object path is currently selected.

Parameters:
path - the path to the checked timeline object
Returns:
TRUE if the referenced timeline object is selected
Since:
1.0

addTimelineLayerSelectionModelListener

void addTimelineLayerSelectionModelListener(ITimelineObjectLayerSelectionListener l)
Adds a listener to the model. The listener will be informed if selections are added to or removed from the model.

Parameters:
l - the listener to add
Since:
1.0

removeTimelineLayerSelectionModelListener

void removeTimelineLayerSelectionModelListener(ITimelineObjectLayerSelectionListener l)
Removes a listener from the model.

Parameters:
l - the listener to remove
Since:
1.0