Documentation of 'org.jhotdraw.draw.event.FigureEvent' Java class
FigureEvent
org.jhotdraw.draw.event

Class FigureEvent

  • All Implemented Interfaces:
    java.io.Serializable


    public class FigureEvent
    extends java.util.EventObject
    An EventObject sent to FigureListeners.
    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.


    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      FigureEvent(Figure source, AttributeKey attribute, java.lang.Object oldValue, java.lang.Object newValue)
      Constructs an event for the given source Figure.
      FigureEvent(Figure source, java.awt.geom.Rectangle2D.Double invalidatedArea)
      Constructs an event for the given source Figure.
    • Constructor Detail

      • FigureEvent

        public FigureEvent(Figure source,
                           java.awt.geom.Rectangle2D.Double invalidatedArea)
        Constructs an event for the given source Figure.
        Parameters:
        invalidatedArea - The bounds of the invalidated area on the drawing.
      • FigureEvent

        public FigureEvent(Figure source,
                           AttributeKey attribute,
                           @Nullable
                           java.lang.Object oldValue,
                           @Nullable
                           java.lang.Object newValue)
        Constructs an event for the given source Figure.
    • Method Detail

      • getFigure

        public Figure getFigure()
        Gets the changed figure
      • getInvalidatedArea

        @Nullable
        public java.awt.geom.Rectangle2D.Double getInvalidatedArea()
        Gets the bounds of the invalidated area on the drawing.
      • getOldValue

        @Nullable
        public java.lang.Object getOldValue()
      • getNewValue

        @Nullable
        public java.lang.Object getNewValue()

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.