venice
Class ZComponent

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
                                |
                                +--venice.ZComponent
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, VComponent, VModelElement, edu.umd.cs.jazz.io.ZSerializable

public class ZComponent
extends ZVisualLeafModelElement
implements VComponent

A concrete implementation of VComponent interface using Jazz library.

Author:
Hannu Laurila
See Also:
Serialized Form

Field Summary
private  edu.umd.cs.jazz.component.ZLabel mComponentLabel
          Jazz visual component visualizing the component label
private  edu.umd.cs.jazz.component.ZRectangle mComponentRectangle
          Jazz visual component visualizing the rectangle around the label
 
Fields inherited from class venice.ZVisualLeafModelElement
mCompositeRelationships, mHiddenOfferedRealizations, mModelElementId, mModelElementName, mModelElementType, mModelElementVisible, mOfferedRealizationSubstitutions, mOriginalRelationships, mRequiredInterfaceSubstitutions, mRequiredRealizations
 
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
ZComponent(java.lang.String inId)
           
 
Method Summary
protected  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.
 java.awt.geom.Point2D getRelationshipConnectPoint()
          get the point where relationships should be attached to.
 java.awt.geom.Point2D intersectWithLine(java.awt.geom.Line2D inLine)
          Intersect this visualization element with a line.
 
Methods inherited from class venice.ZVisualLeafModelElement
addRelationship, addToCompositeRelationshipList, addToHiddenOfferedRealizations, addToOfferedRealizationSubstitutions, addToRequiredInterfaceSubstitutions, addToRequiredRealizations, clearHiddenOfferedRealizations, clearOfferedRealizationSubstitutions, clearRequiredInterfaceSubstitutions, clearRequiredRealizations, debugDump, getCompositeRelationships, getHiddenOfferedRealizations, getId, getName, getOfferedRealizationSubstitutions, getRelationships, getRequiredInterfaceSubstitutions, getRequiredRealizations, getType, getVisible, getVParent, setName, setType, setVisible
 
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
addRelationship, addToCompositeRelationshipList, debugDump, getCompositeRelationships, getId, getName, getRelationships, getType, getVisible, getVParent, setName, setType, setVisible
 

Field Detail

mComponentLabel

private edu.umd.cs.jazz.component.ZLabel mComponentLabel
Jazz visual component visualizing the component label

mComponentRectangle

private edu.umd.cs.jazz.component.ZRectangle mComponentRectangle
Jazz visual component visualizing the rectangle around the label
Constructor Detail

ZComponent

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

dataChanged

protected void dataChanged()
Description copied from class: ZVisualLeafModelElement
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.
Overrides:
dataChanged in class ZVisualLeafModelElement

getRelationshipConnectPoint

public java.awt.geom.Point2D getRelationshipConnectPoint()
Description copied from interface: VModelElement
get the point where relationships should be attached to. Probably element center. This method cannot return null.
Specified by:
getRelationshipConnectPoint in interface VModelElement
Following copied from interface: venice.VModelElement
Returns:
the point for relationships to attach to

intersectWithLine

public java.awt.geom.Point2D intersectWithLine(java.awt.geom.Line2D inLine)
Description copied from interface: VModelElement
Intersect this visualization element with a line. If these graphic elements don't intersect, null is returned.
Specified by:
intersectWithLine in interface VModelElement
Following copied from interface: venice.VModelElement
Parameters:
inLine - the line to calculate intersection with
Returns:
the point of intersection or null