|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject com.jidesoft.gantt.GanttModelEvent
public class GanttModelEvent
GanttModelEvent
is used to notify listeners that a gantt model has changed. The model event describes
changes to a GanttModel and all references to rows are in the co-ordinate system of the model. Depending on the
parameters used in the constructors, the GanttModelEvent can be used to specify the following types of changes:
GanttModelEvent(source); // The data, ie. all rows changed GanttModelEvent(source, 1); // Row 1 changed GanttModelEvent(source, RANGE); // The range of the GanttModel has changed GanttModelEvent(source, 3, 6); // Rows 3 to 6 inclusive changed GanttModelEvent(source, 3, 6, INSERT); // Rows (3, 6) were inserted GanttModelEvent(source, 3, 6, DELETE); // Rows (3, 6) were deletedIt is possible to use other combinations of the parameters, not all of them are meaningful.
Field Summary | |
---|---|
protected int |
_firstRow
|
protected int |
_lastRow
|
protected int |
_subEntryIndex
|
protected int |
_type
|
static int |
DELETE
|
static int |
INSERT
|
static int |
RANGE
Identifies the Range of the GanttModel if returned by getFirstRow() or getLastRow(). |
static int |
UPDATE
|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
GanttModelEvent(GanttModel<?,?> source)
All row data in the table has changed, listeners should discard any state that was based on the rows and requery the GanttModel to get the new row count and all the appropriate values. |
|
GanttModelEvent(GanttModel<?,?> source,
int row)
This row of data has been updated. |
|
GanttModelEvent(GanttModel<?,?> source,
int firstRow,
int lastRow)
The rows in rows [firstRow, lastRow] have been updated. |
|
GanttModelEvent(GanttModel<?,?> source,
int firstRow,
int lastRow,
int type)
The rows from firstRow to lastRow have been changed. |
|
GanttModelEvent(GanttModel<?,?> source,
int firstRow,
int lastRow,
int subEntryIndex,
int type)
The rows from firstRow to lastRow have been changed. |
|
GanttModelEvent(Object source)
|
Method Summary | |
---|---|
int |
getColumn()
Deprecated. replaced by getSubEntryIndex() |
int |
getFirstRow()
Returns the first row that changed. |
int |
getLastRow()
Returns the last row that changed. |
int |
getSubEntryIndex()
Returns the sub entry index of event. |
int |
getType()
Returns the type of event - one of: INSERT, UPDATE and DELETE. |
String |
toString()
|
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int UPDATE
public static final int INSERT
public static final int DELETE
public static final int RANGE
protected int _type
protected int _firstRow
protected int _lastRow
protected int _subEntryIndex
Constructor Detail |
---|
public GanttModelEvent(Object source)
public GanttModelEvent(GanttModel<?,?> source)
GanttModel
to get the new row count and all the appropriate values. The JTable
will
repaint the entire visible region on receiving this event, querying the model for the cell values that are
visible. The structure of the table ie, the column names, types and order have not changed.
source
- the source of the GanttModelEvent.public GanttModelEvent(GanttModel<?,?> source, int row)
HEADER_ROW
as the value for the row
. When the JTable
receives this event
and its autoCreateColumnsFromModel
flag is set it discards any TableColumns that it had and
reallocates default ones in the order they appear in the model. This is the same as calling
setModel(GanttModel)
on the JTable
.
source
- the source of the GanttModelEvent.row
- the row.public GanttModelEvent(GanttModel<?,?> source, int firstRow, int lastRow)
source
- the source of the GanttModelEvent.firstRow
- the first row of the event.lastRow
- the last row of the event.public GanttModelEvent(GanttModel<?,?> source, int firstRow, int lastRow, int type)
source
- the source of the GanttModelEvent.firstRow
- the first row of the event.lastRow
- the last row of the event.type
- the type of the event.public GanttModelEvent(GanttModel<?,?> source, int firstRow, int lastRow, int subEntryIndex, int type)
source
- the source of the GanttModelEvent.firstRow
- the first row of the event.lastRow
- the last row of the event.subEntryIndex
- the sub entry index of the event. -1 if it is not an event related to sub entry.type
- the type of the event.Method Detail |
---|
public int getFirstRow()
RANGE
then the range of the model has changed.
public int getLastRow()
RANGE
then the range of the model has changed.
public int getType()
@Deprecated public int getColumn()
getSubEntryIndex()
public int getSubEntryIndex()
public String toString()
toString
in class EventObject
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |