Code example for EventListenerList

Methods: add

0
     */ 
    @Override 
    public void addFigureChangeListener(FigureChangeListener listener) {
        if (listener != null) {
            if (_listenerList == null) {
                _listenerList = new EventListenerList();
            } 
            _listenerList.add(FigureChangeListener.class, listener);
        } 
    } 
 
    /** 
     * Removes a listener for this figure. 
     * 
     * @param listener the listener to be removed 
     */ 
    @Override 
    public void removeFigureChangeListener(FigureChangeListener listener) {
        if (listener != null && _listenerList != null) {
            _listenerList.remove(FigureChangeListener.class, listener);