public class DiagramEvent
extends java.util.EventObject
DiagramListener
.Constructor and Description |
---|
DiagramEvent(java.lang.Object source,
java.awt.Graphics2D graphics,
java.awt.geom.Rectangle2D visibleRect,
java.awt.geom.Rectangle2D clipRect) |
DiagramEvent(java.lang.Object source,
java.awt.geom.Point2D position,
int button)
Initializes a new DiagramEvent instance.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Rectangle2D |
getClipRect()
Gets the current clipping rectangle.
|
java.awt.Graphics2D |
getGraphics()
Gets an object implementing the Graphics2D interface whose methods should be used to draw the custom graphics.
|
int |
getMouseButton()
Gets the mouse button related to the event.
|
java.awt.geom.Point2D.Float |
getPointerPosition()
Gets the mouse position.
|
java.awt.geom.Rectangle2D |
getVisibleRect()
Gets what part of the diagram is currently visible.
|
public DiagramEvent(java.lang.Object source, java.awt.geom.Point2D position, int button)
source
- The sender of this event.position
- Specifies the mouse pointer position.button
- One of the MouseEvent.BUTTON* constants.public DiagramEvent(java.lang.Object source, java.awt.Graphics2D graphics, java.awt.geom.Rectangle2D visibleRect, java.awt.geom.Rectangle2D clipRect)
public java.awt.geom.Point2D.Float getPointerPosition()
Point2D.Float
object representing
the mouse position in document coordinates.public int getMouseButton()
public java.awt.geom.Rectangle2D getClipRect()
public java.awt.Graphics2D getGraphics()
public java.awt.geom.Rectangle2D getVisibleRect()