org.argouml.model.uml
Class NSUMLEventListener

java.lang.Object
  extended byorg.argouml.model.uml.NSUMLEventListener
All Implemented Interfaces:
EventListener, ru.novosoft.uml.MElementListener
Direct Known Subclasses:
NSUMLClassEventListener, NSUMLModelEventListener

abstract class NSUMLEventListener
extends Object
implements ru.novosoft.uml.MElementListener

This is the base class of relays of events.


Field Summary
private  Object element
           
private  String[] events
           
private  Reference listenerRef
          Contains a WeakReference.
 
Constructor Summary
(package private) NSUMLEventListener(PropertyChangeListener l, Object e, String[] evs)
          Constructor for the NSUMLEventListener.
 
Method Summary
abstract  void delete()
          Unregister this event listener and remove all information about it.
private  void fire(PropertyChangeEvent pce)
          Send an event to the listener (if any).
(package private)  Object getElement()
           
(package private)  String[] getEvents()
           
(package private)  PropertyChangeListener getListener()
          Returns the listener or null if the listener is already Garbage collected.
 void listRoleItemSet(ru.novosoft.uml.MElementEvent arg0)
           
 boolean match(Object e, String[] evs)
          Returns true if this event listener matches the object and event names.
 void propertySet(ru.novosoft.uml.MElementEvent arg0)
           
 void recovered(ru.novosoft.uml.MElementEvent arg0)
           
 void removed(ru.novosoft.uml.MElementEvent arg0)
           
 void roleAdded(ru.novosoft.uml.MElementEvent arg0)
           
 void roleRemoved(ru.novosoft.uml.MElementEvent arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listenerRef

private Reference listenerRef
Contains a WeakReference.


element

private Object element

events

private String[] events
Constructor Detail

NSUMLEventListener

NSUMLEventListener(PropertyChangeListener l,
                   Object e,
                   String[] evs)
Constructor for the NSUMLEventListener.

Parameters:
l - The PropertyChangeListener.
e - The object we are monitoring, can be a class.
evs - The strings that we are interested in.
Method Detail

getListener

PropertyChangeListener getListener()
Returns the listener or null if the listener is already Garbage collected.

Returns:
Returns the listener.

getElement

Object getElement()
Returns:
Returns the element.

getEvents

String[] getEvents()
Returns:
Returns the events.

delete

public abstract void delete()
Unregister this event listener and remove all information about it.


match

public boolean match(Object e,
                     String[] evs)
Returns true if this event listener matches the object and event names.

Parameters:
e - The object to match.
evs - The event names to match.
Returns:
true if matching.

fire

private void fire(PropertyChangeEvent pce)
Send an event to the listener (if any).

Parameters:
pce - The event to send.

propertySet

public void propertySet(ru.novosoft.uml.MElementEvent arg0)
Specified by:
propertySet in interface ru.novosoft.uml.MElementListener
See Also:
MElementListener.propertySet( ru.novosoft.uml.MElementEvent)

roleAdded

public void roleAdded(ru.novosoft.uml.MElementEvent arg0)
Specified by:
roleAdded in interface ru.novosoft.uml.MElementListener
See Also:
MElementListener.roleAdded( ru.novosoft.uml.MElementEvent)

roleRemoved

public void roleRemoved(ru.novosoft.uml.MElementEvent arg0)
Specified by:
roleRemoved in interface ru.novosoft.uml.MElementListener
See Also:
MElementListener.roleRemoved( ru.novosoft.uml.MElementEvent)

listRoleItemSet

public void listRoleItemSet(ru.novosoft.uml.MElementEvent arg0)
Specified by:
listRoleItemSet in interface ru.novosoft.uml.MElementListener
See Also:
MElementListener.listRoleItemSet( ru.novosoft.uml.MElementEvent)

removed

public void removed(ru.novosoft.uml.MElementEvent arg0)
Specified by:
removed in interface ru.novosoft.uml.MElementListener
See Also:
MElementListener.removed( ru.novosoft.uml.MElementEvent)

recovered

public void recovered(ru.novosoft.uml.MElementEvent arg0)
Specified by:
recovered in interface ru.novosoft.uml.MElementListener
See Also:
MElementListener.recovered( ru.novosoft.uml.MElementEvent)


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook