org.jhotdraw.draw.event
Class ToolEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.jhotdraw.draw.event.ToolEvent
-
- All Implemented Interfaces:
- java.io.Serializable
public class ToolEvent extends java.util.EventObjectAn event sent to ToolListener's.
Design PatternsObserver
State changes of tools can be observed by other objects. SpecificallyDrawingEditorobserves area invalidations of tools and repaints its active drawing view accordingly.
Subject:Tool; Observer:ToolListener; Event:ToolEvent; Concrete Observer:DrawingEditor.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ToolEvent(Tool src, DrawingView view, java.awt.Rectangle invalidatedArea)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.awt.RectanglegetInvalidatedArea()Gets the bounds of the invalidated area on the drawing view.ToolgetTool()Gets the tool which is the source of the event.DrawingViewgetView()Gets the drawing view of the tool.
-
-
-
Constructor Detail
-
ToolEvent
public ToolEvent(Tool src, DrawingView view, java.awt.Rectangle invalidatedArea)
Creates a new instance.
-
-
Method Detail
-
getTool
public Tool getTool()
Gets the tool which is the source of the event.
-
getView
public DrawingView getView()
Gets the drawing view of the tool.
-
getInvalidatedArea
public java.awt.Rectangle getInvalidatedArea()
Gets the bounds of the invalidated area on the drawing view.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG