public class DefaultTimelineObjectSelectionModel extends Object implements ITimelineObjectSelectionModel
LayerContainer.getSelectionModel(ILayer)| Constructor and Description |
|---|
DefaultTimelineObjectSelectionModel(ILayer layer)
Constructs a new selection model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSelection(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 |
addTimelineObjectSelectionModelListener(ITimelineObjectSelectionListener l)
Adds a listener to the model.
|
void |
clearSelection()
Clears the current selection.
|
void |
clearSelection(TreePath node)
Clears the current selection for the given path (clears the selection
within a specific row).
|
protected void |
fireValueChanged(TimelineObjectSelectionEvent.ID id,
Collection<TimelineObjectPath> paths)
Fires an event with the given ID to all listeners that are currently
attached to the model.
|
ILayer |
getLayer()
Returns the layer to which the selection model belongs.
|
Iterator<TimelineObjectPath> |
getSelection()
Returns all timeline objects that are currently selected.
|
Iterator<TimelineObjectPath> |
getSelection(TreePath node)
Returns all timeline objects for the given node that are currently
selected.
|
Iterator<TimelineObjectPath> |
getSelection(TreePath path,
ITimeSpan span)
Returns all timeline objects for the given node and time span that are
currently selected.
|
Iterator<TreePath> |
getSelectionPaths()
Returns all tree paths that reference hierarchy objects on which a
selection exists / on which timeline objects are selected.
|
boolean |
isEmpty()
Determines if the current selection is empty.
|
boolean |
isSelected(TimelineObjectPath path)
Determines if the timeline object referenced by the given timeline object
path is currently selected.
|
void |
removeSelection(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 |
removeTimelineObjectSelectionModelListener(ITimelineObjectSelectionListener l)
Removes a listener from the model.
|
public DefaultTimelineObjectSelectionModel(ILayer layer)
layer - the model layer for which the selection model will track the
selected timeline objectspublic ILayer getLayer()
public void clearSelection()
ITimelineObjectSelectionModelclearSelection in interface ITimelineObjectSelectionModelpublic void clearSelection(TreePath node)
ITimelineObjectSelectionModelclearSelection in interface ITimelineObjectSelectionModelnode - the path to the hierarchy node for which the selection will be
clearedpublic void addSelection(TimelineObjectPath path)
ITimelineObjectSelectionModeladdSelection in interface ITimelineObjectSelectionModelpath - the path to the timeline objectpublic void addSelection(Collection<TimelineObjectPath> paths)
ITimelineObjectSelectionModeladdSelection in interface ITimelineObjectSelectionModelpaths - a collection of timeline object pathspublic void removeSelection(TimelineObjectPath path)
ITimelineObjectSelectionModelremoveSelection in interface ITimelineObjectSelectionModelpath - the path to the timeline objectpublic void removeSelection(Collection<TimelineObjectPath> paths)
ITimelineObjectSelectionModelremoveSelection in interface ITimelineObjectSelectionModelpaths - a collection of timeline object pathspublic Iterator<TimelineObjectPath> getSelection(TreePath path, ITimeSpan span)
ITimelineObjectSelectionModelIterator in order to
hide the actual data structure used to store the objects.getSelection in interface ITimelineObjectSelectionModelpath - the path to the hierarchy node for which to return the
selected timeline objectsspan - the time span for which to return the selected timeline
objectsITimelineObjectSelectionModel.getSelection(),
ITimelineObjectSelectionModel.getSelection(TreePath)public Iterator<TimelineObjectPath> getSelection(TreePath node)
ITimelineObjectSelectionModelIterator in order to hide the
actual data structure used to store the objects.getSelection in interface ITimelineObjectSelectionModelnode - the path to the hierarchy node for which to return the
selected timeline objectsITimelineObjectSelectionModel.getSelection(TreePath, ITimeSpan),
ITimelineObjectSelectionModel.getSelection()public Iterator<TimelineObjectPath> getSelection()
ITimelineObjectSelectionModelIterator in order to hide the actual data structure
used to store the objects.getSelection in interface ITimelineObjectSelectionModelITimelineObjectSelectionModel.getSelection(TreePath),
ITimelineObjectSelectionModel.getSelection(TreePath, ITimeSpan)public boolean isSelected(TimelineObjectPath path)
ITimelineObjectSelectionModelisSelected in interface ITimelineObjectSelectionModelpath - the path to the checked timeline objectpublic Iterator<TreePath> getSelectionPaths()
ITimelineObjectSelectionModelgetSelectionPaths in interface ITimelineObjectSelectionModelpublic void addTimelineObjectSelectionModelListener(ITimelineObjectSelectionListener l)
ITimelineObjectSelectionModeladdTimelineObjectSelectionModelListener in interface ITimelineObjectSelectionModell - the listener to addpublic void removeTimelineObjectSelectionModelListener(ITimelineObjectSelectionListener l)
ITimelineObjectSelectionModelremoveTimelineObjectSelectionModelListener in interface ITimelineObjectSelectionModell - the listener to removeprotected void fireValueChanged(TimelineObjectSelectionEvent.ID id, Collection<TimelineObjectPath> paths)
id - the event IDpaths - the timeline object paths that have been added to or removed
from the modelpublic boolean isEmpty()
ITimelineObjectSelectionModelisEmpty in interface ITimelineObjectSelectionModelCopyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.