Package org.snmp4j.agent.mo
Class MOTableModelEvent
java.lang.Object
java.util.EventObject
org.snmp4j.agent.mo.MOTableModelEvent
- All Implemented Interfaces:
Serializable
The
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.- Version:
- 1.0
- Author:
- Frank Fock
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionMOTableModelEvent
(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. -
Method Summary
Methods inherited from class java.util.EventObject
getSource
-
Field Details
-
ROW_CHANGED
public static final int ROW_CHANGED- See Also:
-
ROW_ADDED
public static final int ROW_ADDED- See Also:
-
ROW_REMOVED
public static final int ROW_REMOVED- See Also:
-
TABLE_CLEAR
public static final int TABLE_CLEAR- See Also:
-
-
Constructor Details
-
MOTableModelEvent
Creates a model event associated with a single row and column.- Parameters:
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.
-
MOTableModelEvent
Creates a model event associated with a single row.- Parameters:
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.
-
MOTableModelEvent
Creates the model wide event.- Parameters:
source
- the event source.type
- the event type as defined by the constants of this object.
-
-
Method Details
-
getType
public int getType()Returns the type of event.- Returns:
- one of the event type constants defined by this object.
-
getAffectedRow
Gets the affected row (if a single row is affected by the event).- Returns:
- the
MOTableRow
instance associated with this event, ornull
if the whole model is affected.
-
getColumnIndex
public int getColumnIndex()Returns the column index associated with this event.- Returns:
- a column index >= 0 if a column is associated with this event or -1 if not.
-
toString
- Overrides:
toString
in classEventObject
-