org.argouml.ui.targetmanager
Class TargetEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byorg.argouml.ui.targetmanager.TargetEvent
All Implemented Interfaces:
Serializable

public class TargetEvent
extends EventObject

A targetevent indicating that the target of ArgoUML has changed from the _oldTargets to _newTargets.

See Also:
Serialized Form

Field Summary
static String TARGET_ADDED
          Indicates that a target is being added to the list of targets
static String TARGET_REMOVED
          Indicates that a target is being removed from the list of targets
static String TARGET_SET
          Indicates that a total new set of targets is set
private  String theEventName
          The name of the event
private  Object[] theNewTargets
          The new targets after the change took place
private  Object[] theOldTargets
          The old targets before the change took place
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TargetEvent(Object source, String tEName, Object[] oldTargets, Object[] newTargets)
          Constructs a new TargetEvent
 
Method Summary
 Object[] getAddedTargets()
          Returns the targets that are added to the selection
 String getName()
          Getter for the name
 Object getNewTarget()
          Helper for getting the new target
 Object[] getNewTargets()
          Getter for the new targets
 Object[] getOldTargets()
          Getter for the old targets
 Object[] getRemovedTargets()
          Gets the targets that are removed from the selection
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TARGET_SET

public static final String TARGET_SET
Indicates that a total new set of targets is set

See Also:
Constant Field Values

TARGET_ADDED

public static final String TARGET_ADDED
Indicates that a target is being added to the list of targets

See Also:
Constant Field Values

TARGET_REMOVED

public static final String TARGET_REMOVED
Indicates that a target is being removed from the list of targets

See Also:
Constant Field Values

theEventName

private String theEventName
The name of the event


theOldTargets

private Object[] theOldTargets
The old targets before the change took place


theNewTargets

private Object[] theNewTargets
The new targets after the change took place

Constructor Detail

TargetEvent

public TargetEvent(Object source,
                   String tEName,
                   Object[] oldTargets,
                   Object[] newTargets)
Constructs a new TargetEvent

Parameters:
source - The source that fired the TargetEvent, will allways be the TargetManager
tEName - The name of the TargetEvent, can be TARGET_SET, TARGET_REMOVED or TARGET_ADDED
oldTargets - The old targets before the change took place
newTargets - The new targets after the change took place
Method Detail

getName

public String getName()
Getter for the name

Returns:
the name of the event

getOldTargets

public Object[] getOldTargets()
Getter for the old targets

Returns:
an object array with the old targets

getNewTargets

public Object[] getNewTargets()
Getter for the new targets

Returns:
an object array with the new targets

getNewTarget

public Object getNewTarget()
Helper for getting the new target

Returns:
the zero'th element in _newTargets, or null

getRemovedTargets

public Object[] getRemovedTargets()
Gets the targets that are removed from the selection

Returns:
the removed targets

getAddedTargets

public Object[] getAddedTargets()
Returns the targets that are added to the selection

Returns:
the added targets


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