public class MOTableModelEvent extends EventObject
MOTableModelEvent
event object describes events that change
a table model. Such events include adding, removing, and changing of rows
as well as clearing a whole model.Modifier and Type | Field and Description |
---|---|
static int |
ROW_ADDED |
static int |
ROW_CHANGED |
static int |
ROW_REMOVED |
static int |
TABLE_CLEAR |
source
Constructor and Description |
---|
MOTableModelEvent(Object source,
int type)
Creates the model wide event.
|
MOTableModelEvent(Object source,
int type,
MOTableRow affectedRow)
Creates a model event associated with a single row.
|
MOTableModelEvent(Object source,
int type,
MOTableRow affectedRow,
int columnIndex)
Creates a model event associated with a single row and column.
|
Modifier and Type | Method and Description |
---|---|
MOTableRow |
getAffectedRow()
Gets the affected row (if a single row is affected by the event).
|
int |
getColumnIndex()
Returns the column index associated with this event.
|
int |
getType()
Returns the type of event.
|
String |
toString() |
getSource
public static final int ROW_CHANGED
public static final int ROW_ADDED
public static final int ROW_REMOVED
public static final int TABLE_CLEAR
public MOTableModelEvent(Object source, int type, MOTableRow affectedRow, int columnIndex)
source
- the event source.type
- the event type as defined by the ROW_* constants of this object.affectedRow
- the row that is associated with this event.columnIndex
- the column index associated with this event.public MOTableModelEvent(Object source, int type, MOTableRow affectedRow)
source
- the event source.type
- the event type as defined by the ROW_* constants of this object.affectedRow
- the row that is associated with this event.public MOTableModelEvent(Object source, int type)
source
- the event source.type
- the event type as defined by the constants of this object.public int getType()
public MOTableRow getAffectedRow()
MOTableRow
instance associated with this event, or
null
if the whole model is affected.public int getColumnIndex()
public String toString()
toString
in class EventObject
Copyright © 2017 SNMP4J.org. All rights reserved.