|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.gantt.AbstractGanttModel<T,S> com.jidesoft.gantt.DefaultGanttModel<T,S>
T
- The type of the bases unit of the scale, for example Date or Integer.S
- The type of the GanttEntry in the model.public class DefaultGanttModel<T,S extends GanttEntry<T>>
DefaultGanttModel
is an implementation of GanttModel
that uses a
TreeTableModel
to store the gantt entries. For the GanttEntryRelationModel, it uses
DefaultGanttEntryRelationModel
. For the ScaleMode
, user can set it using setter.
DefaultGanttModel
is calculated automatically by default based on its gantt entries.
However user can call setAutoUpdateRange(boolean)
and set it to false if he/she wants to set the range
manually.
Field Summary |
---|
Fields inherited from class com.jidesoft.gantt.AbstractGanttModel |
---|
listenerList |
Constructor Summary | |
---|---|
DefaultGanttModel()
|
|
DefaultGanttModel(ITreeTableModel<S> treeTableModel)
|
Method Summary | ||
---|---|---|
void |
addGanttEntry(S entry)
|
|
protected DefaultGanttEntryRelationModel<S> |
createGanttEntryRelationModel()
|
|
GanttEntryRelationModel<S> |
getGanttEntryRelationModel()
Gets the model that defines the relationship among gantt entries. |
|
Range<T> |
getRange()
Gets the range of the GanttModel . |
|
ScaleModel<T> |
getScaleModel()
Gets the ScaleModel. |
|
ITreeTableModel<S> |
getTreeTableModel()
Returns the TreeTableModel instance. |
|
boolean |
isAutoUpdateRange()
|
|
protected boolean |
isRangeColumn(int columnIndex)
Checks if the column index is a range column such as range start or range end or any other column that will affect the calculation of the range. |
|
void |
removeGanttEntry(S entry)
|
|
void |
setAutoUpdateRange(boolean autoUpdateRanged)
Whether the GanttModel Range should be automatically updated to fit the GanttEntry Ranges. |
|
void |
setGanttEntryRelationModel(GanttEntryRelationModel<S> ganttEntryRelationModel)
|
|
void |
setRange(Range<T> range)
|
|
void |
setScaleModel(ScaleModel<T> scaleModel)
|
|
void |
setTreeTableModel(ITreeTableModel<S> treeTableModel)
|
|
static
|
union(Range<T> targetRange,
Expandable parent)
NOTE: This method will do nothing if the current Range is null! |
|
static
|
union(Range<T> targetRange,
Expandable parent,
GanttEntry<T> child)
NOTE: This method will do nothing if the current Range is null! |
|
protected void |
updateRange(TableModelEvent e)
Updates the Range to the union of all the root child GanttEntries. |
Methods inherited from class com.jidesoft.gantt.AbstractGanttModel |
---|
addGanttModelListener, fireGanttChanged, fireGanttDataChanged, fireGanttEntriesDeleted, fireGanttEntriesInserted, fireGanttEntriesUpdated, getEntryAt, getEntryCount, getGanttModelListeners, getIndexOf, removeGanttModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultGanttModel()
public DefaultGanttModel(ITreeTableModel<S> treeTableModel)
Method Detail |
---|
protected DefaultGanttEntryRelationModel<S> createGanttEntryRelationModel()
public ITreeTableModel<S> getTreeTableModel()
GanttModel
TreeTableModel
instance.
The returned model should also be a TableModel
instance! Enforcing this through the type system would
introduce another generic type.
public void setTreeTableModel(ITreeTableModel<S> treeTableModel)
protected boolean isRangeColumn(int columnIndex)
columnIndex
- the column index.
protected void updateRange(TableModelEvent e)
e
- the TableModelEventpublic void setAutoUpdateRange(boolean autoUpdateRanged)
autoUpdateRanged
- true to automatically update the Range
.public boolean isAutoUpdateRange()
public Range<T> getRange()
GanttModel
GanttModel
. It is the union of the ranges in all the gantt entries.
public void setRange(Range<T> range)
public ScaleModel<T> getScaleModel()
GanttModel
public void setScaleModel(ScaleModel<T> scaleModel)
public GanttEntryRelationModel<S> getGanttEntryRelationModel()
GanttModel
public void setGanttEntryRelationModel(GanttEntryRelationModel<S> ganttEntryRelationModel)
public void addGanttEntry(S entry)
public void removeGanttEntry(S entry)
public static <T> void union(Range<T> targetRange, Expandable parent, GanttEntry<T> child)
T
- The type of the bases unit of the scale, for example Date or Integer.targetRange
- the target range.parent
- the parentchild
- the childpublic static <T> void union(Range<T> targetRange, Expandable parent)
T
- The type of the bases unit of the scale, for example Date or Integer.targetRange
- the target rangeparent
- the parent
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |