org.snmp4j.agent.mo
Class MOTableModelEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.snmp4j.agent.mo.MOTableModelEvent
All Implemented Interfaces:
java.io.Serializable

public class MOTableModelEvent
extends java.util.EventObject

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:
Serialized Form

Field Summary
static int ROW_ADDED
           
static int ROW_CHANGED
           
static int ROW_REMOVED
           
static int TABLE_CLEAR
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MOTableModelEvent(java.lang.Object source, int type)
          Creates the model wide event.
MOTableModelEvent(java.lang.Object source, int type, MOTableRow affectedRow)
          Creates a model event associated with a single row.
MOTableModelEvent(java.lang.Object source, int type, MOTableRow affectedRow, int columnIndex)
          Creates a model event associated with a single row and column.
 
Method Summary
 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.
 java.lang.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

ROW_CHANGED

public static final int ROW_CHANGED
See Also:
Constant Field Values

ROW_ADDED

public static final int ROW_ADDED
See Also:
Constant Field Values

ROW_REMOVED

public static final int ROW_REMOVED
See Also:
Constant Field Values

TABLE_CLEAR

public static final int TABLE_CLEAR
See Also:
Constant Field Values
Constructor Detail

MOTableModelEvent

public MOTableModelEvent(java.lang.Object source,
                         int type,
                         MOTableRow affectedRow,
                         int columnIndex)
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

public MOTableModelEvent(java.lang.Object source,
                         int type,
                         MOTableRow affectedRow)
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

public MOTableModelEvent(java.lang.Object source,
                         int type)
Creates the model wide event.

Parameters:
source - the event source.
type - the event type as defined by the constants of this object.
Method Detail

getType

public int getType()
Returns the type of event.

Returns:
one of the event type constants defined by this object.

getAffectedRow

public MOTableRow getAffectedRow()
Gets the affected row (if a single row is affected by the event).

Returns:
the MOTableRow instance associated with this event, or null 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

public java.lang.String toString()
Overrides:
toString in class java.util.EventObject

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.