buoy.event

Class RepaintEvent

Implemented Interfaces:
WidgetEvent

public class RepaintEvent
extends EventObject
implements WidgetEvent

A RepaintEvent is generated by certain Widgets (including CustomWidgets and many WidgetContainers) whenever a portion of it needs to be repainted.
Author:
Peter Eastman

Constructor Summary

RepaintEvent(Widget widget, Graphics2D graphics)
Create a RepaintEvent.

Method Summary

Graphics2D
getGraphics()
Get a Graphics2D which can be used to paint the Widget.
Widget
getWidget()
Get the Widget which generated this event.

Constructor Details

RepaintEvent

public RepaintEvent(Widget widget,
                    Graphics2D graphics)
Create a RepaintEvent.
Parameters:
widget - the Widget which needs to be painted
graphics - a Graphics2D object which can be used to paint the Widget

Method Details

getGraphics

public Graphics2D getGraphics()
Get a Graphics2D which can be used to paint the Widget.

getWidget

public Widget getWidget()
Get the Widget which generated this event.
Specified by:
getWidget in interface WidgetEvent

Written by Peter Eastman.