com.mindfusion.diagramming
Class CellEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.mindfusion.diagramming.CellEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CellValidationEvent

public class CellEvent
extends java.util.EventObject

Contains information passed to the cellClicked event defined in DiagramListener.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CellEvent(java.lang.Object source, Cell cell, int column, int row, java.awt.geom.Point2D position, int button)
          Initializes a new CellEvent instance.
 
Method Summary
 Cell getCell()
          Gets a reference to the cell related to the event.
 int getColumn()
          Gets the index of the cell column.
 int getMouseButton()
          Gets the mouse mouseButton related to the event.
 java.awt.geom.Point2D.Float getMousePosition()
          Gets the mouse position.
 int getRow()
          Gets the index of the cell row.
 TableNode getTable()
          Gets a reference to the table related to this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CellEvent

public CellEvent(java.lang.Object source,
                 Cell cell,
                 int column,
                 int row,
                 java.awt.geom.Point2D position,
                 int button)
Initializes a new CellEvent instance.

Parameters:
source - The sender of this event.
cell - The Cell related to this event.
position - The position of the mouse at the time the event was raised.
column - The cell column.
row - The cell row.
Method Detail

getCell

public Cell getCell()
Gets a reference to the cell related to the event.

Returns:
A reference to a Cell object.

getTable

public TableNode getTable()
Gets a reference to the table related to this event.

Returns:
A reference to a TableNode object.

getColumn

public int getColumn()
Gets the index of the cell column.

Returns:
An integer number specifying the cell column.

getRow

public int getRow()
Gets the index of the cell row.

Returns:
An integer number specifying the cell row.

getMousePosition

public java.awt.geom.Point2D.Float getMousePosition()
Gets the mouse position.

Returns:
A Point2D.Float object representing the mouse position in document coordinates.

getMouseButton

public int getMouseButton()
Gets the mouse mouseButton related to the event.

Returns:
One of the MouseEvent.BUTTON* constants.