venice
Class ZVisualLeafModelElement

java.lang.Object
  |
  +--edu.umd.cs.jazz.ZSceneGraphObject
        |
        +--edu.umd.cs.jazz.ZNode
              |
              +--edu.umd.cs.jazz.ZLeaf
                    |
                    +--edu.umd.cs.jazz.ZVisualLeaf
                          |
                          +--venice.ZVisualLeafModelElement
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, VModelElement, edu.umd.cs.jazz.io.ZSerializable
Direct Known Subclasses:
ZComponent, ZInterface, ZRelationship

public abstract class ZVisualLeafModelElement
extends edu.umd.cs.jazz.ZVisualLeaf
implements VModelElement

ZVisualLeafModelElement is a common superclass for all different visual components except ZPackage. This class includes model element handling functions so we don't need to duplicate that code everywhere.

Author:
Hannu Laurila
See Also:
Serialized Form

Field Summary
private  java.util.LinkedList mCompositeRelationships
           
private  java.util.LinkedList mHiddenOfferedRealizations
          List of this elements hidden offered interface realizations.
protected  java.lang.String mModelElementId
          model element id
protected  java.lang.String mModelElementName
          model element name
protected  java.lang.String mModelElementType
          model element type
protected  boolean mModelElementVisible
          is this model element visible
private  java.util.LinkedList mOfferedRealizationSubstitutions
          List of this elements offered interface substituted realizations.
private  java.util.LinkedList mOriginalRelationships
          The list of original relationships
private  java.util.LinkedList mRequiredInterfaceSubstitutions
           
private  java.util.LinkedList mRequiredRealizations
          List of this elements required interface realizations.
 
Fields inherited from class edu.umd.cs.jazz.ZVisualLeaf
cacheVolatile, visualComponents
 
Fields inherited from class edu.umd.cs.jazz.ZNode
clientProperties, editorFactory, findable, findable_DEFAULT, hasNodeListener, hasNodeListener_DEFAULT, parent, pickable, pickable_DEFAULT, savable, savable_DEFAULT, selectable, selectable_DEFAULT
 
Fields inherited from class edu.umd.cs.jazz.ZSceneGraphObject
bounds, inClone, listenerList, objRefTable, volatileBounds, volatileBounds_DEFAULT
 
Constructor Summary
ZVisualLeafModelElement(java.lang.String inId)
           
 
Method Summary
 void addRelationship(VRelationship inRelationship)
          Add the given VRelationship, where this element is either the source or destination, to this element's list of original relationships.
 VRelationship addToCompositeRelationshipList(VRelationship inRel)
          Add the given relationship to this element's list of composite relationships.
 void addToHiddenOfferedRealizations(VRelationship inRea)
          Add relationship to this list.
 void addToOfferedRealizationSubstitutions(VRelationship inRea)
          Add relationship to this list.
 void addToRequiredInterfaceSubstitutions(VRelationship inRea)
          Add relationship to this list.
 void addToRequiredRealizations(VRelationship inRea)
          Add relationship to this list.
 void clearHiddenOfferedRealizations()
          Clear content of this list.
 void clearOfferedRealizationSubstitutions()
          Clear content of this list.
 void clearRequiredInterfaceSubstitutions(VRelationship inRea)
          Clear inRea from this list.
 void clearRequiredRealizations()
          Clear content of this list.
protected abstract  void dataChanged()
          dataChanged() is called when model element data is changed. subclasses should override this method with a method which modifies the component appearance according to data changes.
 void debugDump()
          Dump information for this node to stdout.
 java.util.LinkedList getCompositeRelationships()
          Returns the list of all composite relationships this element has.
 java.util.LinkedList getHiddenOfferedRealizations()
          Get content of this list.
 java.lang.String getId()
          returns the id of the element
 java.lang.String getName()
          returns the name of the element
 java.util.LinkedList getOfferedRealizationSubstitutions()
          Get content of this list.
 java.util.LinkedList getRelationships(VPackage inCrossThisPackage)
          Returns a linked list of relationships that leave the given VPackage and are attached to this node and are not represented by any other relationship.
 java.util.LinkedList getRequiredInterfaceSubstitutions()
          Get content of this list.
 java.util.LinkedList getRequiredRealizations()
          Get content of this list.
 java.lang.String getType()
          returns the type of the element
 boolean getVisible()
          returns true if element is shown in the visualization
 VPackage getVParent()
          get parent package for this node.
 void setName(java.lang.String inName)
          sets the name of the element
 void setType(java.lang.String inType)
          sets the type of the element
 void setVisible(boolean inState)
          sets the visibility of the element
 
Methods inherited from class edu.umd.cs.jazz.ZVisualLeaf
addVisualComponent, addVisualComponents, clearVisualComponents, computeBounds, duplicateObject, getFirstVisualComponent, getNumVisualComponents, getVisualComponent, getVisualComponentBounds, getVisualComponentGlobalBounds, getVisualComponents, getVolatileBounds, indexOf, pick, removeVisualComponent, render, setState, setVisualComponent, setVisualComponent, trimToSize, updateObjectReferences, updateVolatility, writeObject, writeObject, writeObjectRecurse
 
Methods inherited from class edu.umd.cs.jazz.ZNode
, addClientProperty, addNodeListener, dump, editor, extract, findNodes, getClientProperty, getGlobalBounds, getGlobalToLocalTransform, getLocalToGlobalTransform, getParent, getRoot, globalToLocal, globalToLocal, hasNodeListener, isAncestorOf, isDescendentOf, isFindable, isPickable, isSavable, isSelectable, localToGlobal, localToGlobal, lower, lowerTo, percolateEventUpSceneGraph, putClientProperty, raise, raiseTo, remove, removeNodeListener, repaint, repaint, repaint, reparent, replaceWith, setEditorFactory, setFindable, setParent, setPickable, setSavable, setSelectable, updateBounds, writeReplace
 
Methods inherited from class edu.umd.cs.jazz.ZSceneGraphObject
addMouseListener, addMouseMotionListener, clone, fireEvent, fireMouseEvent, getBounds, getBoundsReference, getListenerList, hasLisenerOfType, hasMouseListener, processMouseEvent, removeEventListener, removeMouseListener, removeMouseMotionListener, reshape, setBounds, setVolatileBounds
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface venice.VModelElement
getRelationshipConnectPoint, intersectWithLine
 

Field Detail

mModelElementId

protected java.lang.String mModelElementId
model element id

mModelElementName

protected java.lang.String mModelElementName
model element name

mModelElementType

protected java.lang.String mModelElementType
model element type

mModelElementVisible

protected boolean mModelElementVisible
is this model element visible

mOriginalRelationships

private java.util.LinkedList mOriginalRelationships
The list of original relationships

mOfferedRealizationSubstitutions

private java.util.LinkedList mOfferedRealizationSubstitutions
List of this elements offered interface substituted realizations.

mHiddenOfferedRealizations

private java.util.LinkedList mHiddenOfferedRealizations
List of this elements hidden offered interface realizations.

mRequiredRealizations

private java.util.LinkedList mRequiredRealizations
List of this elements required interface realizations.

mRequiredInterfaceSubstitutions

private java.util.LinkedList mRequiredInterfaceSubstitutions

mCompositeRelationships

private java.util.LinkedList mCompositeRelationships
Constructor Detail

ZVisualLeafModelElement

public ZVisualLeafModelElement(java.lang.String inId)
Method Detail

dataChanged

protected abstract void dataChanged()
dataChanged() is called when model element data is changed. subclasses should override this method with a method which modifies the component appearance according to data changes.

getId

public java.lang.String getId()
Description copied from interface: VModelElement
returns the id of the element
Specified by:
getId in interface VModelElement

getName

public java.lang.String getName()
Description copied from interface: VModelElement
returns the name of the element
Specified by:
getName in interface VModelElement

getType

public java.lang.String getType()
Description copied from interface: VModelElement
returns the type of the element
Specified by:
getType in interface VModelElement

getVisible

public boolean getVisible()
Description copied from interface: VModelElement
returns true if element is shown in the visualization
Specified by:
getVisible in interface VModelElement

setName

public void setName(java.lang.String inName)
Description copied from interface: VModelElement
sets the name of the element
Specified by:
setName in interface VModelElement

setType

public void setType(java.lang.String inType)
Description copied from interface: VModelElement
sets the type of the element
Specified by:
setType in interface VModelElement

setVisible

public void setVisible(boolean inState)
Description copied from interface: VModelElement
sets the visibility of the element
Specified by:
setVisible in interface VModelElement

getRelationships

public java.util.LinkedList getRelationships(VPackage inCrossThisPackage)
Description copied from interface: VModelElement
Returns a linked list of relationships that leave the given VPackage and are attached to this node and are not represented by any other relationship. If this element is a package, relationships from all children that cross the given border are returned also.

Relationships can be original relationships as described in the model or temporary relationships created to reprensent composite relationships that are needed when child nodes move their dependencies to their parents.

If the parameter is null, all relationships attached to this node are returned.

Specified by:
getRelationships in interface VModelElement
Following copied from interface: venice.VModelElement
Parameters:
inLeaveThisPackage - the package that all returned relationships must leave
Returns:
linked list of relationships for this node and its children that cross the given package

addRelationship

public void addRelationship(VRelationship inRelationship)
Description copied from interface: VModelElement
Add the given VRelationship, where this element is either the source or destination, to this element's list of original relationships. Original relationships are those relations that are defined in the GXL model, not created on the fly by the visualization.
Specified by:
addRelationship in interface VModelElement
Following copied from interface: venice.VModelElement
Parameters:
inRelationship - add given relation as an original relationship for this model element.

addToHiddenOfferedRealizations

public void addToHiddenOfferedRealizations(VRelationship inRea)
Add relationship to this list.

addToOfferedRealizationSubstitutions

public void addToOfferedRealizationSubstitutions(VRelationship inRea)
Add relationship to this list.

addToRequiredInterfaceSubstitutions

public void addToRequiredInterfaceSubstitutions(VRelationship inRea)
Add relationship to this list.

addToRequiredRealizations

public void addToRequiredRealizations(VRelationship inRea)
Add relationship to this list.

clearHiddenOfferedRealizations

public void clearHiddenOfferedRealizations()
Clear content of this list.

clearOfferedRealizationSubstitutions

public void clearOfferedRealizationSubstitutions()
Clear content of this list.

clearRequiredInterfaceSubstitutions

public void clearRequiredInterfaceSubstitutions(VRelationship inRea)
Clear inRea from this list.

clearRequiredRealizations

public void clearRequiredRealizations()
Clear content of this list.

getRequiredRealizations

public java.util.LinkedList getRequiredRealizations()
Get content of this list.

getHiddenOfferedRealizations

public java.util.LinkedList getHiddenOfferedRealizations()
Get content of this list.

getOfferedRealizationSubstitutions

public java.util.LinkedList getOfferedRealizationSubstitutions()
Get content of this list.

getRequiredInterfaceSubstitutions

public java.util.LinkedList getRequiredInterfaceSubstitutions()
Get content of this list.

getVParent

public VPackage getVParent()
Description copied from interface: VModelElement
get parent package for this node.
Specified by:
getVParent in interface VModelElement

getCompositeRelationships

public java.util.LinkedList getCompositeRelationships()
Description copied from interface: VModelElement
Returns the list of all composite relationships this element has.
Specified by:
getCompositeRelationships in interface VModelElement
Following copied from interface: venice.VModelElement
Returns:
the list of composite relationships for this element

addToCompositeRelationshipList

public VRelationship addToCompositeRelationshipList(VRelationship inRel)
Description copied from interface: VModelElement
Add the given relationship to this element's list of composite relationships.
Specified by:
addToCompositeRelationshipList in interface VModelElement
Following copied from interface: venice.VModelElement
Parameters:
inRel - The relationship to add to list of composite relationships.
Returns:
the new composite VRelationship in which inRel was added or null if inRel was added in an old composite VRelationship

debugDump

public void debugDump()
Description copied from interface: VModelElement
Dump information for this node to stdout.
Specified by:
debugDump in interface VModelElement