T
- the type of the node objectsS
- the type of the timeline objectspublic interface IGanttChartModel<T,S> extends ITreeTableModel<T>
ITreeTableModel
) where the superclass methods provide the
data for the left-hand side of the chart and the subclass provides the
right-hand side values.
A Gantt chart model provides the following information:
Layer
definitions. Various types of layers are used
on the right-hand side of the Gantt chart. The layer definitions returned by
the model will result in the creation of instances of
TimelineObjectLayer
, which are responsible for rendering the
timeline objectsBinarySearchTimelineObjectIterator
or
LinearSearchTimelineObjectIterator
) for a given layer and time span.
When the user scrolls the right-hand side of the Gantt chart only a small
part needs to be repainted. If the user scrolled 10 pixels to the right, the
time span covered by these 10 pixels will be used for a model query.IRelationship
objects for a given timeline
object. The relationships will be visualized via connecting lines between
objects.IGanttChartModelListener
can be attached to the
model. The listeners will be informed in these cases:
AbstractGanttChart.setModel(IGanttChartModel)
,
DualGanttChart.setSecondaryModel(IGanttChartModel)
,
IGanttChartModelListener
,
IGanttChartNode
Modifier and Type | Method and Description |
---|---|
void |
addGanttChartModelListener(IGanttChartModelListener l)
Adds a listener to the model.
|
Iterator<S> |
getChildrenTimelineObjects(S parent)
Returns an iterator over the children of the given parent timeline
object.
|
Iterator<ILayer> |
getLayers()
Returns an iterator over the layers used by the model.
|
Iterator<IRelationship<S>> |
getRelationships()
Returns all relationships so that they can be visualized by the
RelationshipLayer . |
Iterator<IRelationship<S>> |
getRelationships(S timelineObject)
Returns those relationships that have the given timeline object either as
a source or as a target object.
|
Iterator<ISpreadsheet> |
getSpreadsheets()
Returns an iterator over the spreadsheets used by the model.
|
Object |
getSpreadsheetValue(ISpreadsheet spreadsheet,
T node,
ITimeSpan span)
Returns an object for the given tree node, the given spreadsheet and the
given time span.
|
Class |
getSpreadsheetValueType(ISpreadsheet spreadsheet,
T node,
ITimeSpan span)
Returns the type of the object shown within the specified spreadsheet
cell (specification via tree node, spreadsheet, time span).
|
Iterator<S> |
getTimelineObjectsIterator(T node,
ILayer layer,
ITimeSpan span)
Returns an
Iterator that can be used to iterate over all timeline
objects stored on the given node and layer within the given time span. |
ITimeSpan |
getTimeSpan(S timelineObject)
Returns the time span of the given timeline object.
|
boolean |
isParentTimelineObject(S timelineObject)
Determines whether the given timeline object is a parent timeline object.
|
void |
removeGanttChartModelListener(IGanttChartModelListener l)
Removes a listener from the model.
|
addTreeTableModelListener, getColumnValue, getKey, getRowHeaderValue, removeTreeTableModelListener, setColumnValue, setKey, sort
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged
Iterator<ILayer> getLayers()
TimelineObjectLayer
for each layer
model definition.getTimelineObjectsIterator(Object, ILayer, ITimeSpan)
Iterator<S> getTimelineObjectsIterator(T node, ILayer layer, ITimeSpan span)
Iterator
that can be used to iterate over all timeline
objects stored on the given node and layer within the given time span.
This method is not allowed to return NULL.node
- the tree node for which to return an iteratorlayer
- the layer for which to return an iteratorspan
- the time span for which to return an iteratorITimeSpan getTimeSpan(S timelineObject)
DefaultGanttChartModel
does store the span on the internally used IGanttChartNode
instances.timelineObject
- the object for which to return the time spanIterator<IRelationship<S>> getRelationships()
RelationshipLayer
.Iterator<IRelationship<S>> getRelationships(S timelineObject)
RelationshipLayer
wants to
figure out which lines need to be drawn.timelineObject
- the object for which to return relationshipsboolean isParentTimelineObject(S timelineObject)
timelineObject
- the timeline object to checkgetChildrenTimelineObjects(Object)
Iterator<S> getChildrenTimelineObjects(S parent)
parent
- the parent timeline objectIterator<ISpreadsheet> getSpreadsheets()
SpreadsheetLayer
which is
capable of displaying one spreadsheet at a time.Object getSpreadsheetValue(ISpreadsheet spreadsheet, T node, ITimeSpan span)
spreadsheet
- the spreadsheet for which to return a value for the given node
and time spannode
- a node within the tree table on the left-hand side of the
Gantt chartspan
- the time span for which to return a value (the span is usually
a whole day, month, week ...)getSpreadsheetValueType(ISpreadsheet, Object, ITimeSpan)
Class getSpreadsheetValueType(ISpreadsheet spreadsheet, T node, ITimeSpan span)
spreadsheet
- the spreadsheet for which to return a value typenode
- a node within the tree table on the left-hand side of the
Gantt chartspan
- the time span for which to return a value type (the span is
usually a whole day, month, week ...)getSpreadsheetValue(ISpreadsheet, Object, ITimeSpan)
void addGanttChartModelListener(IGanttChartModelListener l)
l
- the new listenerremoveGanttChartModelListener(IGanttChartModelListener)
,
GanttChartModelEvent
void removeGanttChartModelListener(IGanttChartModelListener l)
l
- the listener to removeaddGanttChartModelListener(IGanttChartModelListener)
Copyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.