protected void fireFigureChanged(Rectangle2D.Double changedArea) { if (listenerList.getListenerCount() > 0) { FigureEvent event = null;   Object[] listeners = listenerList.getListenerList();   for (int i = listeners.length-2; i>=0; i-=2) { if (listeners[i] == FigureListener.class) {  if (event == null) event = new FigureEvent(this, changedArea); ((FigureListener)listeners[i+1]).figureChanged(event); } } }
public void fireFigureChanged() { fireFigureChanged(getBounds());
    protected void fireFigureChanged(Rectangle2D.Double changedArea) {        if (listenerList.getListenerCount() > 0) {            FigureEvent event = null;            // Notify all listeners that have registered interest for            // Guaranteed to return a non-null array            Object[] listeners = listenerList.getListenerList();            // Process the listeners last to first, notifying            // those that are interested in this event            for (int i = listeners.length-2; i>=0; i-=2) {                if (listeners[i] == FigureListener.class) {                    // Lazily create the event:                    if (event == null)                        event = new FigureEvent(this, changedArea);                    ((FigureListener)listeners[i+1]).figureChanged(event);                }            }        }    }