|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.AbstractFigure
diva.canvas.toolbox.BasicFigure
diva.canvas.toolbox.BasicRectangle
diva.canvas.tutorial.ConnectorTutorial.SitedRectangle
public static class ConnectorTutorial.SitedRectangle
SitedRectangle is a class that provides four sites that we use in the examples to attach connectors to. In this example, we make life easy by using an instance of the BoundsGeometry class, but in general, figures will want to define their own sites. One thing to note about this figure: it does not itself contain the code that re-routes the attached connectors. Although it could override transform() and translate, in general it is better for this kind of routing to be initiated by the interaction code.
Field Summary | |
---|---|
private BoundsGeometry |
_geometry
|
Constructor Summary | |
---|---|
ConnectorTutorial.SitedRectangle(double x,
double y,
double width,
double height,
java.awt.Color color)
Create a new instance of this figure. |
Method Summary | |
---|---|
Site |
getE()
Get the east site. |
Site |
getN()
Get the north site. |
Site |
getS()
Get the south site. |
Site |
getW()
Get the west site. |
void |
transform(java.awt.geom.AffineTransform at)
Update the geometry |
void |
translate(double x,
double y)
Update the geometry |
Methods inherited from class diva.canvas.toolbox.BasicFigure |
---|
getBounds, getComposite, getDashArray, getFillPaint, getLineWidth, getOrigin, getShape, getStrokePaint, hit, isCentered, paint, setCentered, setComposite, setDashArray, setFillPaint, setLineWidth, setPrototypeShape, setShape, setStroke, setStrokePaint |
Methods inherited from class diva.canvas.AbstractFigure |
---|
contains, getInteractor, getLayer, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface diva.canvas.Figure |
---|
contains, getInteractor, getLayer, getParent, getToolTipText, intersects, setInteractor, setParent, setToolTipText |
Methods inherited from interface diva.canvas.VisibleComponent |
---|
isVisible, paint, setVisible |
Methods inherited from interface diva.canvas.CanvasComponent |
---|
getTransformContext, repaint, repaint |
Methods inherited from interface diva.util.UserObjectContainer |
---|
getUserObject, setUserObject |
Field Detail |
---|
private BoundsGeometry _geometry
Constructor Detail |
---|
public ConnectorTutorial.SitedRectangle(double x, double y, double width, double height, java.awt.Color color)
Method Detail |
---|
public Site getN()
public Site getS()
public Site getE()
public Site getW()
public void transform(java.awt.geom.AffineTransform at)
transform
in interface Figure
transform
in class BasicFigure
public void translate(double x, double y)
translate
in interface Figure
translate
in class BasicRectangle
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |