|
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>
T
- The type of the bases unit of the scale, for example Date or Integer.S
- The type of the GanttEntries in the model.public abstract class AbstractGanttModel<T,S extends GanttEntry<T>>
This abstract class provides default implementations for most of the methods in the GanttModel
interface. It takes care of the management of listeners and provides some conveniences for generating
GanttModelEvents
and dispatching them to the listeners. To create a concrete GanttModel
as
a subclass of AbstractGanttModel
you need only provide implementations for the following four methods:
public ITreeTableModel getTreeTableModel();
public Range getRange();
public ScaleModel getScaleModel();
public GanttEntryRelationModel getGanttEntryRelationModel();
Field Summary | |
---|---|
protected EventListenerList |
listenerList
List of listeners |
Constructor Summary | |
---|---|
protected |
AbstractGanttModel()
|
Method Summary | |
---|---|
void |
addGanttModelListener(GanttModelListener l)
Adds a listener to the list that's notified each time a change to the gantt model occurs. |
void |
fireGanttChanged(GanttModelEvent e)
Forwards the given notification event to all GanttModelListeners that registered themselves as
listeners for this gantt model. |
void |
fireGanttDataChanged()
Notifies all listeners that all gantt enties may have changed. |
void |
fireGanttEntriesDeleted(int firstRow,
int lastRow)
Notifies all listeners that rows in the range [firstRow, lastRow] , inclusive, have been deleted. |
void |
fireGanttEntriesInserted(int firstRow,
int lastRow)
Notifies all listeners that rows in the range [firstRow, lastRow] , inclusive, have been inserted. |
void |
fireGanttEntriesUpdated(int firstRow,
int lastRow)
Notifies all listeners that rows in the range [firstRow, lastRow] , inclusive, have been updated. |
S |
getEntryAt(int index)
Gets the entry at the entry index. |
int |
getEntryCount()
Gets the total entry count. |
GanttModelListener[] |
getGanttModelListeners()
Returns an array of all the gantt model listeners registered on this model. |
int |
getIndexOf(S entry)
Gets the index of the entry. |
void |
removeGanttModelListener(GanttModelListener l)
Removes a listener from the list that's notified each time a change to the data model occurs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.jidesoft.gantt.GanttModel |
---|
getGanttEntryRelationModel, getRange, getScaleModel, getTreeTableModel |
Field Detail |
---|
protected EventListenerList listenerList
Constructor Detail |
---|
protected AbstractGanttModel()
Method Detail |
---|
public int getEntryCount()
GanttModel
getEntryCount
in interface GanttModel<T,S extends GanttEntry<T>>
public S getEntryAt(int index)
GanttModel
getEntryAt
in interface GanttModel<T,S extends GanttEntry<T>>
index
- the entry index.
public int getIndexOf(S entry)
GanttModel
getIndexOf
in interface GanttModel<T,S extends GanttEntry<T>>
entry
- the entry
public void addGanttModelListener(GanttModelListener l)
addGanttModelListener
in interface GanttModel<T,S extends GanttEntry<T>>
l
- the GanttModelListenerpublic void removeGanttModelListener(GanttModelListener l)
removeGanttModelListener
in interface GanttModel<T,S extends GanttEntry<T>>
l
- the GanttModelListenerpublic GanttModelListener[] getGanttModelListeners()
GanttModelListener
s or an empty array if no gantt model listeners are
currently registeredaddGanttModelListener(com.jidesoft.gantt.GanttModelListener)
,
removeGanttModelListener(com.jidesoft.gantt.GanttModelListener)
public void fireGanttDataChanged()
GanttChart
should redraw the chart from scratch.
GanttModelEvent
,
EventListenerList
public void fireGanttEntriesInserted(int firstRow, int lastRow)
[firstRow, lastRow]
, inclusive, have been inserted.
firstRow
- the first rowlastRow
- the last rowGanttModelEvent
,
EventListenerList
public void fireGanttEntriesUpdated(int firstRow, int lastRow)
[firstRow, lastRow]
, inclusive, have been updated.
firstRow
- the first rowlastRow
- the last rowGanttModelEvent
,
EventListenerList
public void fireGanttEntriesDeleted(int firstRow, int lastRow)
[firstRow, lastRow]
, inclusive, have been deleted.
firstRow
- the first rowlastRow
- the last rowGanttModelEvent
,
EventListenerList
public void fireGanttChanged(GanttModelEvent e)
GanttModelListeners
that registered themselves as
listeners for this gantt model.
e
- the event to be forwardedaddGanttModelListener(com.jidesoft.gantt.GanttModelListener)
,
GanttModelEvent
,
EventListenerList
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |