|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dlsc.flexgantt.swing.layer.timeline.DefaultTimelineObjectLayerSelectionModel
public class DefaultTimelineObjectLayerSelectionModel
The default implementation of the timeline object layer selection model. For more information please refer to the interface documentation.
LayerContainer.getSelectionModel(ILayer)
Constructor Summary | |
---|---|
DefaultTimelineObjectLayerSelectionModel(ILayer layer)
Constructs a new selection model. |
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 node)
Clears the current selection for the given path (clears the selection within a specific row). |
protected void |
fireValueChanged(TimelineObjectSelectionEvent.ID id,
java.util.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. |
java.util.Iterator<TimelineObjectPath> |
getSelection()
Returns all timeline objects that are currently selected. |
java.util.Iterator<TimelineObjectPath> |
getSelection(javax.swing.tree.TreePath node)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultTimelineObjectLayerSelectionModel(ILayer layer)
layer
- the model layer for which the selection model will track the
selected timeline objectsMethod Detail |
---|
public ILayer getLayer()
public void clearSelection()
ITimelineObjectLayerSelectionModel
clearSelection
in interface ITimelineObjectLayerSelectionModel
public void clearSelection(javax.swing.tree.TreePath node)
ITimelineObjectLayerSelectionModel
clearSelection
in interface ITimelineObjectLayerSelectionModel
node
- the path to the hierarchy node for which the selection will be
clearedpublic void addSelection(TimelineObjectPath path)
ITimelineObjectLayerSelectionModel
addSelection
in interface ITimelineObjectLayerSelectionModel
path
- the path to the timeline objectpublic void addSelection(java.util.Collection<TimelineObjectPath> paths)
ITimelineObjectLayerSelectionModel
addSelection
in interface ITimelineObjectLayerSelectionModel
paths
- a collection of timeline object pathspublic void removeSelection(TimelineObjectPath path)
ITimelineObjectLayerSelectionModel
removeSelection
in interface ITimelineObjectLayerSelectionModel
path
- the path to the timeline objectpublic void removeSelection(java.util.Collection<TimelineObjectPath> paths)
ITimelineObjectLayerSelectionModel
removeSelection
in interface ITimelineObjectLayerSelectionModel
paths
- a collection of timeline object pathspublic java.util.Iterator<TimelineObjectPath> getSelection(javax.swing.tree.TreePath path, ITimeSpan span)
ITimelineObjectLayerSelectionModel
Iterator
in order to
hide the actual data structure used to store the objects.
getSelection
in interface ITimelineObjectLayerSelectionModel
path
- the path to the hierarchy node for which to return the
selected timeline objectsspan
- the time span for which to return the selected timeline
objects
ITimelineObjectLayerSelectionModel.getSelection()
,
ITimelineObjectLayerSelectionModel.getSelection(TreePath)
public java.util.Iterator<TimelineObjectPath> getSelection(javax.swing.tree.TreePath node)
ITimelineObjectLayerSelectionModel
Iterator
in order to hide the
actual data structure used to store the objects.
getSelection
in interface ITimelineObjectLayerSelectionModel
node
- the path to the hierarchy node for which to return the
selected timeline objects
ITimelineObjectLayerSelectionModel.getSelection(TreePath, ITimeSpan)
,
ITimelineObjectLayerSelectionModel.getSelection()
public java.util.Iterator<TimelineObjectPath> getSelection()
ITimelineObjectLayerSelectionModel
Iterator
in order to hide the actual data structure
used to store the objects.
getSelection
in interface ITimelineObjectLayerSelectionModel
ITimelineObjectLayerSelectionModel.getSelection(TreePath)
,
ITimelineObjectLayerSelectionModel.getSelection(TreePath, ITimeSpan)
public boolean isSelected(TimelineObjectPath path)
ITimelineObjectLayerSelectionModel
isSelected
in interface ITimelineObjectLayerSelectionModel
path
- the path to the checked timeline object
public java.util.Iterator<javax.swing.tree.TreePath> getSelectionPaths()
ITimelineObjectLayerSelectionModel
getSelectionPaths
in interface ITimelineObjectLayerSelectionModel
public void addTimelineLayerSelectionModelListener(ITimelineObjectLayerSelectionListener l)
ITimelineObjectLayerSelectionModel
addTimelineLayerSelectionModelListener
in interface ITimelineObjectLayerSelectionModel
l
- the listener to addpublic void removeTimelineLayerSelectionModelListener(ITimelineObjectLayerSelectionListener l)
ITimelineObjectLayerSelectionModel
removeTimelineLayerSelectionModelListener
in interface ITimelineObjectLayerSelectionModel
l
- the listener to removeprotected void fireValueChanged(TimelineObjectSelectionEvent.ID id, java.util.Collection<TimelineObjectPath> paths)
id
- the event IDpaths
- the timeline object paths that have been added to or removed
from the model
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |