T - the type of the timeline objects returned by the nodepublic interface IGanttChartNode<T> extends ITreeTableNode
ITreeTableNode interface, which carries
additional information that can be used to populate the right-hand
side of a Gantt chart. Objects that implement this interface are capable of
returning objects for a given time span, values for rendering custom row
headers, values for spreadsheet cells, etc.| Modifier and Type | Method and Description |
|---|---|
void |
addTimelineObjects(ILayer layer,
Collection<T> timelineObjects)
Adds a collection of timeline objects to the node.
|
void |
clearTimelineObjects(ILayer layer)
Removes all timeline objects (currently shown on the given layer) from
the node.
|
int |
getDropActions(T timelineObject,
long timePoint)
Returns the drop actions that can be performed on the node related to
timeline objects.
|
int |
getLineCount()
Returns how many lines will be shown within the row that is occuupied by
the Gantt chart node.
|
int |
getLineHeight(int lineIndex,
int rowHeight)
Returns the height of the line with the given index based on the given
row height.
|
int |
getLineLocation(int lineIndex,
int rowHeight)
Returns the location of the line with the given index based on the given
row height.
|
Object |
getSpreadsheetValue(ISpreadsheet spreadsheet,
ITimeSpan span)
Returns a value for the given time span.
|
List<T> |
getTimelineObjects()
Returns a list of all timeline objects on all layers.
|
List<T> |
getTimelineObjects(ILayer layer)
Returns a list of all timeline objects that are associated with the given
layer.
|
Iterator<T> |
getTimelineObjectsIterator(ILayer layer,
ITimeSpan span)
Returns an iterator for all timeline objects on the given layer for the
given time span.
|
boolean |
isSelectable(ITimeSpan span)
Determines whether the given time span can be selected for the node.
|
boolean |
isTimelineObjectCreatableAt(ITimeSpan span,
ILayer layer)
Determines whether a new timeline object can be created for the given
time span.
|
void |
removeTimelineObjects(ILayer layer,
Collection<T> timelineObjects)
Removes a collection of objects from the node.
|
void |
setSpreadsheetValue(ISpreadsheet spreadsheet,
Object value,
ITimeSpan span)
Specifies a new value for the given time span.
|
getColumnValue, getDragActions, getDropActions, getKey, getPopupObject, getPopupTitleObject, getRowHeaderValue, getRowHeight, getRowHeightMaximum, getRowHeightMinimum, getToolTipText, isDeletable, isKeyEditable, isReassignable, isResizable, isRowLineVisible, isSelectable, isValueEditable, setColumnValue, setKey, setRowHeaderValue, setRowHeight, sortchildren, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeafIterator<T> getTimelineObjectsIterator(ILayer layer, ITimeSpan span)
layer - the layer for which to return the timeline objectsspan - the time span for which to return the timeline objectsgetTimelineObjects(ILayer),
getTimelineObjects()List<T> getTimelineObjects()
getTimelineObjects(ILayer)List<T> getTimelineObjects(ILayer layer)
layer - the layer for which to return the timeline objectsgetTimelineObjectsIterator(ILayer, ITimeSpan),
addTimelineObjects(ILayer, Collection),
removeTimelineObjects(ILayer, Collection)void clearTimelineObjects(ILayer layer)
layer - the layer from which to remove all timeline objectsvoid addTimelineObjects(ILayer layer, Collection<T> timelineObjects)
layer - the layer to which the objects will be addedtimelineObjects - the objects that will be addedremoveTimelineObjects(ILayer, Collection)void removeTimelineObjects(ILayer layer, Collection<T> timelineObjects)
layer - the layer in which the timeline objects are currently showntimelineObjects - the objects to removeaddTimelineObjects(ILayer, Collection)int getLineCount()
int getLineLocation(int lineIndex,
int rowHeight)
getLineCount()) and multiply
it with the line index. This way all lines will be distributed equally
across the total height of the row.lineIndex - the index of the line for which to return a location (if the
total line count is 4 then the indices will be 0, 1, 2, 3)rowHeight - the total height of the Gantt chart row (this value can vary
depending on whether the user or the application resized the
row)int getLineHeight(int lineIndex,
int rowHeight)
getLineCount()) but
applications are free to let lines overlap if so desired.lineIndex - the index of the line for which to return the height (if the
total line count is 4 then the indices will be 0, 1, 2, 3)rowHeight - the total height of the Gantt chart row (this value can vary
depending on whether the user or the application resized the
row)boolean isSelectable(ITimeSpan span)
span - the time span to check for selectabilityint getDropActions(T timelineObject, long timePoint)
DnDConstants.
Possible values are:
Declaring the drop actions is only half of the work needed for correct
drag and drop behaviour. A timeline object might be droppable onto
the node but it also needs to be draggable.This behaviour is
defined by calling ITimelineObject.getDragActions().timelineObject - the timeline object that might get dropped onto this nodetimePoint - the time point where the timeline object might get droppedDefaultDragAndDropCommand,
IDragAndDropPolicy.getDragActions(TimelineObjectPath,
IGanttChartModel)boolean isTimelineObjectCreatableAt(ITimeSpan span, ILayer layer)
span - the time span where the new timeline object will be createdlayer - the layer to which the timeline object will be addedIEditTimelineObjectPolicy.isCreatable(Object, IGanttChartModel,
ILayer, ITimeSpan),
DefaultCreateTimelineObjectCommandObject getSpreadsheetValue(ISpreadsheet spreadsheet, ITimeSpan span)
spreadsheet - the spreadsheet from where to lookup the valuespan - the time span for which to return a valuesetSpreadsheetValue(ISpreadsheet, Object, ITimeSpan)void setSpreadsheetValue(ISpreadsheet spreadsheet, Object value, ITimeSpan span)
spreadsheet - the spreadsheet where the value gets changedvalue - the new spreadsheet cell valuespan - the time span for which the new value is validgetSpreadsheetValue(ISpreadsheet, ITimeSpan)Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.