|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.umd.cs.jazz.ZSceneGraphObject | +--edu.umd.cs.jazz.ZNode | +--edu.umd.cs.jazz.ZGroup | +--venice.ZPackage
ZPackage is a concrete implementation of VPackage using Jazz library. ZPackage is implemented as an extension of Jazz's ZGroup which provides useful grouping mechanisms so we do not have to implement them ourselves.
Field Summary | |
private edu.umd.cs.jazz.ZGroup |
mChildGroup
the group below ZPackage which is the real place for all children of type VModelElement. |
private java.util.LinkedList |
mCompositeRelationships
This packages list of composite relationships. |
private edu.umd.cs.jazz.component.ZRectangle |
mContentRectangle
visual component used to draw the rectangle around package contents |
private java.util.LinkedList |
mHiddenOfferedRealizations
If package has hidden offered interfaces their realizations are kept in this list. |
private boolean |
mIsRootPackage
is this package a root package. |
private edu.umd.cs.jazz.component.ZRectangle |
mLabelRectangle
visual component used to draw the rectangle around package label |
private boolean |
mListenersEnabled
a not-serialized variable telling that no listeners are enabled. after deserialization, the value of this will always be false. |
private java.lang.String |
mModelElementId
model element id |
private java.lang.String |
mModelElementName
model element name |
private java.lang.String |
mModelElementType
model element type |
private boolean |
mModelElementVisible
model element visibility |
private java.util.LinkedList |
mOfferedRealizationSubstitutions
If package has hidden offered interfaces their substitute dependencies are kept in this list. |
private java.util.LinkedList |
mOriginalRelationships
This packages list of original relationships. |
private edu.umd.cs.jazz.component.ZLabel |
mPackageLabel
visual component used to draw the package label |
private java.util.LinkedList |
mRequiredInterfaceSubstitutions
|
private java.util.LinkedList |
mRequiredRealizations
If package has required interfaces drawn their realizations are kept in this list. |
private boolean |
mShowContent
show content (children) of the package |
private int |
mState
Package state, OPEN by default. |
private static double |
stAssumedLabelHeight
Used for estimating label height on initialization |
Fields inherited from class edu.umd.cs.jazz.ZGroup |
cacheVolatile, children, childrenFindable, childrenFindable_DEFAULT, childrenPickable, childrenPickable_DEFAULT, hasOneChild, hasOneChild_DEFAULT |
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 |
Fields inherited from interface venice.VPackage |
CLOSED, OPEN, TRANSPARENT |
Constructor Summary | |
ZPackage(java.lang.String inId,
boolean inInitialListenersEnabled)
|
Method Summary | |
private void |
addChildGroupListener()
|
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 |
addVChild(VModelElement inElem)
Adds a modelelement to be children of this package. |
void |
boundsChanged(edu.umd.cs.jazz.event.ZNodeEvent e)
Notified when childrens bounds change. |
void |
clearHiddenOfferedRealizations()
Clear this list. |
void |
clearOfferedRealizationSubstitutions()
Clear this list. |
void |
clearRequiredInterfaceSubstitutions(VRelationship inRea)
Clear VRelationship inRea from this list. |
void |
clearRequiredRealizations()
Clear this list. |
protected void |
computeBounds()
computes the bounds of this ZPackage. |
protected void |
dataChanged()
modify the package rectangles etc. called when for example child moves so we need to determine new positions for the rectangles |
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.awt.geom.Point2D |
getRelationshipConnectPoint()
get the point where relationships should be attached to. |
java.util.LinkedList |
getRelationships(VPackage inCrossThisPackage)
Returns a list of relationships which start from this package and span across the border of the given package and are not represented by some other relationship. |
java.util.LinkedList |
getRequiredInterfaceSubstitutions()
Get content of this list. |
java.util.LinkedList |
getRequiredRealizations()
Get content of this list. |
boolean |
getShowContent()
Get current status of package content visibility |
int |
getState()
Tells the state of this package. |
java.lang.String |
getType()
returns the type of the element |
VModelElement[] |
getVChildren()
returns an array consisting of contents of the package |
boolean |
getVisible()
returns true if element is shown in the visualization |
VPackage |
getVParent()
get parent package for this node. |
void |
globalBoundsChanged(edu.umd.cs.jazz.event.ZNodeEvent e)
|
java.awt.geom.Point2D |
intersectWithLine(java.awt.geom.Line2D inLine)
Intersect this visualization element with a line. |
boolean |
isRootPackage()
determine if this package is root package. |
void |
makeDefaultLayout(boolean inRecurse,
int level)
creates the default layout for the package. |
boolean |
pick(java.awt.geom.Rectangle2D rect,
edu.umd.cs.jazz.util.ZSceneGraphPath path)
|
void |
removeAllVChildren(boolean inRecurse)
clears the package. |
private void |
removeChildGroupListener()
|
void |
removeVChild(VModelElement inElem)
removes a child from the package |
void |
render(edu.umd.cs.jazz.util.ZRenderContext ctx)
renders this package |
private void |
setFadingEnabled(boolean inState)
Enables fading of package contents while getting closer. |
void |
setListenersEnabled(boolean inEnabled,
boolean inRecurse)
sets all listeners of this object uses to be either enabled or disabled. |
void |
setName(java.lang.String inName)
sets the name of the element |
void |
setRootPackage(boolean inIsRootPackage)
set if this package is the root package. |
void |
setShowContent(boolean inState)
sets the status of package content visibility |
void |
setState(int inState)
Sets the state of the package. |
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.ZGroup |
addChild, addChildImpl, addChildren, addGroupListener, childAddedNotification, childRemovedNotification, dump, duplicateObject, extract, findNodes, getChild, getChildren, getChildrenFindable, getChildrenIterator, getChildrenPickable, getChildrenReference, getNumChildren, getShallowBounds, getVolatileBounds, hasOneChild, indexOf, insertAbove, iterator, lower, lowerTo, raise, raiseTo, removeAllChildren, removeChild, removeChild, removeChild, removeChildImpl, removeGroupListener, removeNodeListener, setChildrenFindable, setChildrenPickable, setHasOneChild, setState, trimToSize, updateHasNodeListener, updateVolatility, writeObject, writeObject, writeObjectRecurse |
Methods inherited from class edu.umd.cs.jazz.ZNode |
|
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 |
Field Detail |
private static double stAssumedLabelHeight
private java.lang.String mModelElementId
private java.lang.String mModelElementName
private java.lang.String mModelElementType
private boolean mModelElementVisible
private boolean mShowContent
private edu.umd.cs.jazz.ZGroup mChildGroup
private boolean mIsRootPackage
private edu.umd.cs.jazz.component.ZLabel mPackageLabel
private edu.umd.cs.jazz.component.ZRectangle mLabelRectangle
private edu.umd.cs.jazz.component.ZRectangle mContentRectangle
private java.util.LinkedList mOriginalRelationships
private java.util.LinkedList mCompositeRelationships
private java.util.LinkedList mOfferedRealizationSubstitutions
private java.util.LinkedList mHiddenOfferedRealizations
private java.util.LinkedList mRequiredRealizations
private java.util.LinkedList mRequiredInterfaceSubstitutions
private int mState
private transient boolean mListenersEnabled
Constructor Detail |
public ZPackage(java.lang.String inId, boolean inInitialListenersEnabled)
Method Detail |
private void setFadingEnabled(boolean inState)
public void addToHiddenOfferedRealizations(VRelationship inRea)
public void addToOfferedRealizationSubstitutions(VRelationship inRea)
public void addToRequiredInterfaceSubstitutions(VRelationship inRea)
public void addToRequiredRealizations(VRelationship inRea)
public void clearRequiredRealizations()
public void clearHiddenOfferedRealizations()
public void clearOfferedRealizationSubstitutions()
public void clearRequiredInterfaceSubstitutions(VRelationship inRea)
public java.util.LinkedList getRequiredRealizations()
public java.util.LinkedList getHiddenOfferedRealizations()
public java.util.LinkedList getOfferedRealizationSubstitutions()
public java.util.LinkedList getRequiredInterfaceSubstitutions()
private void removeChildGroupListener()
private void addChildGroupListener()
public void setListenersEnabled(boolean inEnabled, boolean inRecurse)
ListenerStateChangeable
setListenersEnabled
in interface ListenerStateChangeable
venice.ListenerStateChangeable
inEnabled
- new state for listenersinRecurse
- whether to recurse to vmodelelement childrenpublic void addVChild(VModelElement inElem)
VPackage
addVChild
in interface VPackage
public boolean getShowContent()
VPackage
getShowContent
in interface VPackage
venice.VPackage
public VModelElement[] getVChildren()
VPackage
getVChildren
in interface VPackage
public void removeVChild(VModelElement inElem)
VPackage
removeVChild
in interface VPackage
public VPackage getVParent()
VModelElement
getVParent
in interface VModelElement
public void setShowContent(boolean inState)
VPackage
setShowContent
in interface VPackage
public void makeDefaultLayout(boolean inRecurse, int level)
inRecurse
- if true, recurses to children ZPackages.protected void computeBounds()
computeBounds
in class edu.umd.cs.jazz.ZGroup
public void render(edu.umd.cs.jazz.util.ZRenderContext ctx)
render
in class edu.umd.cs.jazz.ZGroup
public boolean pick(java.awt.geom.Rectangle2D rect, edu.umd.cs.jazz.util.ZSceneGraphPath path)
pick
in class edu.umd.cs.jazz.ZGroup
protected void dataChanged()
public void boundsChanged(edu.umd.cs.jazz.event.ZNodeEvent e)
boundsChanged
in interface edu.umd.cs.jazz.event.ZNodeListener
public void globalBoundsChanged(edu.umd.cs.jazz.event.ZNodeEvent e)
globalBoundsChanged
in interface edu.umd.cs.jazz.event.ZNodeListener
public void removeAllVChildren(boolean inRecurse)
inRecurse
- if true, clears the children ZPackages too.public void setRootPackage(boolean inIsRootPackage)
inIsRootPackage
- true, if this is root packagepublic boolean isRootPackage()
public java.lang.String getId()
VModelElement
getId
in interface VModelElement
public java.lang.String getName()
VModelElement
getName
in interface VModelElement
public java.lang.String getType()
VModelElement
getType
in interface VModelElement
public boolean getVisible()
VModelElement
getVisible
in interface VModelElement
public void setName(java.lang.String inName)
VModelElement
setName
in interface VModelElement
public void setType(java.lang.String inType)
VModelElement
setType
in interface VModelElement
public void setVisible(boolean inState)
VModelElement
setVisible
in interface VModelElement
public java.awt.geom.Point2D getRelationshipConnectPoint()
VModelElement
getRelationshipConnectPoint
in interface VModelElement
venice.VModelElement
public java.awt.geom.Point2D intersectWithLine(java.awt.geom.Line2D inLine)
VModelElement
intersectWithLine
in interface VModelElement
venice.VModelElement
inLine
- the line to calculate intersection withpublic java.util.LinkedList getRelationships(VPackage inCrossThisPackage)
getRelationships
in interface VModelElement
venice.VModelElement
inLeaveThisPackage
- the package that all returned relationships
must leavepublic void addRelationship(VRelationship inRelationship)
VModelElement
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.addRelationship
in interface VModelElement
venice.VModelElement
inRelationship
- add given relation as an original
relationship for this model element.public VRelationship addToCompositeRelationshipList(VRelationship inRel)
VModelElement
addToCompositeRelationshipList
in interface VModelElement
venice.VModelElement
inRel
- The relationship to add to list of composite
relationships.public java.util.LinkedList getCompositeRelationships()
VModelElement
getCompositeRelationships
in interface VModelElement
venice.VModelElement
public void setState(int inState)
VPackage
setState
in interface VPackage
public int getState()
VPackage
getState
in interface VPackage
public void debugDump()
VModelElement
debugDump
in interface VModelElement
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |