org.objectweb.jac.ide.diagrams
Class ClassFigure

java.lang.Object
  extended byCH.ifa.draw.standard.AbstractFigure
      extended byCH.ifa.draw.standard.CompositeFigure
          extended byorg.objectweb.jac.ide.diagrams.ClassFigure
All Implemented Interfaces:
Cloneable, EventListener, CH.ifa.draw.framework.Figure, CH.ifa.draw.framework.FigureChangeListener, ModelElementFigure, ObjectUpdate, Serializable
Direct Known Subclasses:
AspectFigure

public class ClassFigure
extends CH.ifa.draw.standard.CompositeFigure
implements ObjectUpdate, ModelElementFigure

See Also:
Serialized Form

Field Summary
 
Fields inherited from class CH.ifa.draw.standard.CompositeFigure
_nHighestZ, _nLowestZ, fFigures
 
Fields inherited from interface CH.ifa.draw.framework.Figure
POPUP_MENU
 
Constructor Summary
ClassFigure(ClassFigure figure, Package pack, CH.ifa.draw.framework.DrawingView view)
           
 
Method Summary
 void basicDisplayBox(Point origin, Point corner)
           
protected  void basicMoveBy(int dx, int dy)
           
 void close()
          Unregister from update events
 CH.ifa.draw.framework.Connector connectorAt(Point p)
           
 Rectangle displayBox()
           
 void draw(Graphics g)
           
protected  void drawBorder(Graphics g)
           
 void figureChanged(CH.ifa.draw.framework.FigureChangeEvent e)
           
 void figureRemoved(CH.ifa.draw.framework.FigureChangeEvent e)
           
 Class getClassElement()
           
 ClassFigure getClassFig()
           
protected  Color getColor()
           
 Package getContainerPackage()
          Get the value of containerPackage.
 Point getCorner()
           
protected  Color getFillColor()
           
 String getName()
           
 Vector getRelationLinkFigures()
           
 ModelElement getSubstance()
          Returns the model element associated with this figure.
 Vector handles()
           
 void layout()
          Compute the width of the figure, and the position of field and method figures
 void objectUpdated(Object object, Object extra)
          The callback method.
 void release()
           
 void setClassFig(ClassFigure classFig)
           
 void setContainerPackage(Package v)
          Set the value of containerPackage.
 void update(CH.ifa.draw.framework.FigureChangeEvent e)
           
 
Methods inherited from class CH.ifa.draw.standard.CompositeFigure
add, addAll, addAll, bringToFront, draw, figureAt, figureCount, figureInvalidated, figureRequestRemove, figureRequestUpdate, figures, figures, figuresReverse, findFigure, findFigure, findFigure, findFigureInside, findFigureInsideWithout, findFigureWithout, getFigureFromLayer, getLayer, includes, init, orphan, orphanAll, orphanAll, remove, removeAll, removeAll, removeAll, replace, sendToBack, sendToLayer
 
Methods inherited from class CH.ifa.draw.standard.AbstractFigure
addFigureChangeListener, addToContainer, canConnect, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, getAttribute, getZValue, invalidate, isEmpty, listener, moveBy, removeFigureChangeListener, removeFromContainer, setAttribute, setZValue, size, willChange
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface CH.ifa.draw.framework.Figure
addFigureChangeListener, addToContainer, canConnect, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, figures, findFigureInside, getAttribute, getZValue, includes, invalidate, isEmpty, listener, moveBy, removeFigureChangeListener, removeFromContainer, setAttribute, setZValue, size, willChange
 

Constructor Detail

ClassFigure

public ClassFigure(ClassFigure figure,
                   Package pack,
                   CH.ifa.draw.framework.DrawingView view)
Method Detail

objectUpdated

public void objectUpdated(Object object,
                          Object extra)
Description copied from interface: ObjectUpdate
The callback method.

Specified by:
objectUpdated in interface ObjectUpdate
Parameters:
object - the updated object
extra - extra data
See Also:
ViewControlWrapper.registerObject(Wrappee,ObjectUpdate,Object)

close

public void close()
Description copied from interface: ModelElementFigure
Unregister from update events

Specified by:
close in interface ModelElementFigure

getContainerPackage

public Package getContainerPackage()
Get the value of containerPackage.

Returns:
value of containerPackage.

setContainerPackage

public void setContainerPackage(Package v)
Set the value of containerPackage.

Parameters:
v - Value to assign to containerPackage.

basicMoveBy

protected void basicMoveBy(int dx,
                           int dy)

displayBox

public Rectangle displayBox()
Specified by:
displayBox in interface CH.ifa.draw.framework.Figure

basicDisplayBox

public void basicDisplayBox(Point origin,
                            Point corner)
Specified by:
basicDisplayBox in interface CH.ifa.draw.framework.Figure

getFillColor

protected Color getFillColor()

getColor

protected Color getColor()

drawBorder

protected void drawBorder(Graphics g)

draw

public void draw(Graphics g)
Specified by:
draw in interface CH.ifa.draw.framework.Figure

handles

public Vector handles()
Specified by:
handles in interface CH.ifa.draw.framework.Figure

getRelationLinkFigures

public Vector getRelationLinkFigures()

getName

public String getName()

layout

public void layout()
Compute the width of the figure, and the position of field and method figures


update

public void update(CH.ifa.draw.framework.FigureChangeEvent e)

figureChanged

public void figureChanged(CH.ifa.draw.framework.FigureChangeEvent e)
Specified by:
figureChanged in interface CH.ifa.draw.framework.FigureChangeListener

figureRemoved

public void figureRemoved(CH.ifa.draw.framework.FigureChangeEvent e)
Specified by:
figureRemoved in interface CH.ifa.draw.framework.FigureChangeListener

release

public void release()
Specified by:
release in interface CH.ifa.draw.framework.Figure

getClassFig

public ClassFigure getClassFig()

setClassFig

public void setClassFig(ClassFigure classFig)

getCorner

public Point getCorner()

getSubstance

public ModelElement getSubstance()
Description copied from interface: ModelElementFigure
Returns the model element associated with this figure.

Specified by:
getSubstance in interface ModelElementFigure

getClassElement

public Class getClassElement()

connectorAt

public CH.ifa.draw.framework.Connector connectorAt(Point p)