JHotDraw 7.4.1

org.jhotdraw.draw.event
Interface FigureListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
AbstractAttributeEditorHandler.EventHandler, AbstractCompositeFigure.EventHandler, AbstractConnectionHandle, AbstractHandle, AbstractRotateHandle, BezierControlPointHandle, BezierNodeHandle, BezierOutlineHandle, BezierScaleHandle, BoundsOutlineHandle, CloseHandle, ConnectionEndHandle, ConnectionStartHandle, ConnectorHandle, ConvexHullOutlineHandle, DragHandle, DrawingComponentRepainter, FigureAdapter, FontSizeHandle, LabelFigure, LinkHandle, LocatorHandle, MoveHandle, NullHandle, ODGPathOutlineHandle, ODGRectRadiusHandle, OrientationHandle, QuadTreeCompositeFigure.FigureHandler, QuadTreeDrawing.QuadTreeEventHandler, RotateHandle, RoundRectangleRadiusHandle, SelectionComponentRepainter, SVGPathOutlineHandle, SVGRectRadiusHandle, TextOverflowHandle

public interface FigureListener
extends java.util.EventListener

Interface implemented by observers of Figure objects.


Design Patterns

Observer
State changes of figures can be observed by other objects. Specifically CompositeFigure observes area invalidations and remove requests of its child figures. DrawingView also observes area invalidations of its drawing object. Subject: Figure; Observer: FigureListener; Event: FigureEvent; Concrete Observer: CompositeFigure, DrawingView.


Version:
$Id: FigureListener.java 604 2010-01-09 12:00:29Z rawcoder $
Author:
Werner Randelshofer

Method Summary
 void areaInvalidated(FigureEvent e)
          Sent when the drawing area used by the figure needs to be repainted.
 void attributeChanged(FigureEvent e)
          Sent when an attribute of the figure has changed.
 void figureAdded(FigureEvent e)
          Sent when a figure was added to a drawing.
 void figureChanged(FigureEvent e)
          Sent when the geometry (for example the bounds) of the figure has changed.
 void figureHandlesChanged(FigureEvent e)
          Sent when handles of a Figure have been added, removed or replaced.
 void figureRemoved(FigureEvent e)
          Sent when a figure was removed from a drawing.
 void figureRequestRemove(FigureEvent e)
          Sent when the figure requests to be removed from a drawing.
 

Method Detail

areaInvalidated

void areaInvalidated(FigureEvent e)
Sent when the drawing area used by the figure needs to be repainted.


attributeChanged

void attributeChanged(FigureEvent e)
Sent when an attribute of the figure has changed.


figureHandlesChanged

void figureHandlesChanged(FigureEvent e)
Sent when handles of a Figure have been added, removed or replaced.

DrawingViews listen to this event to repopulate the Handles.

A Figure should not fire this event, if just the state or the location of Handle has changed.


figureChanged

void figureChanged(FigureEvent e)
Sent when the geometry (for example the bounds) of the figure has changed.


figureAdded

void figureAdded(FigureEvent e)
Sent when a figure was added to a drawing.


figureRemoved

void figureRemoved(FigureEvent e)
Sent when a figure was removed from a drawing.


figureRequestRemove

void figureRequestRemove(FigureEvent e)
Sent when the figure requests to be removed from a drawing.


Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.