edu.neu.ccs.gui
Class PaintActionEvent
java.lang.Object
java.util.EventObject
java.awt.AWTEvent
java.awt.event.ActionEvent
edu.neu.ccs.gui.PaintActionEvent
- All Implemented Interfaces:
- Serializable
- public class PaintActionEvent
- extends ActionEvent
Class of events representing an action
triggered by a call to paint a component.
- Since:
- 2.2
- Version:
- 2.2
- See Also:
- Serialized Form
|
Field Summary |
protected Graphics |
graphicsContext
The graphics context of the component that triggered
this change action event. |
| Fields inherited from class java.awt.AWTEvent |
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK |
|
Constructor Summary |
PaintActionEvent(Object source,
Graphics g)
Constructs a paint action event
triggered by the given source object,
with the given graphics context. |
PaintActionEvent(Object source,
Graphics g,
int id,
String command)
Constructs a repaint action event
triggered by the given source object,
with the given graphics context, identifier and command name. |
|
Method Summary |
Component |
getComponent()
Returns the component source that triggered
this paint action event. |
Graphics |
getGraphics()
Returns the graphics context of the component
that triggered this paint action event. |
graphicsContext
protected Graphics graphicsContext
- The graphics context of the component that triggered
this change action event.
PaintActionEvent
public PaintActionEvent(Object source,
Graphics g)
- Constructs a paint action event
triggered by the given source object,
with the given graphics context.
- Parameters:
g - graphics context of the component sourcesource - the object that originated the event
PaintActionEvent
public PaintActionEvent(Object source,
Graphics g,
int id,
String command)
- Constructs a repaint action event
triggered by the given source object,
with the given graphics context, identifier and command name.
- Parameters:
g - graphics context of the component sourcesource - the object that originated the eventid - an integer that identifies the eventcommand - a string that may specify a command
(possibly one of several)
associated with the event
getGraphics
public Graphics getGraphics()
- Returns the graphics context of the component
that triggered this paint action event.
getComponent
public Component getComponent()
- Returns the component source that triggered
this paint action event.
- Throws:
ClassCastException - if the source object
for this action event is not of type Component