|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.rolemodelsoft.drawlet.basics.AbstractPaintable
|
+--com.rolemodelsoft.drawlet.basics.AbstractFigure
|
+--com.rolemodelsoft.drawlet.shapes.AbstractShape
|
+--com.rolemodelsoft.drawlet.shapes.FilledShape
|
+--com.rolemodelsoft.drawlet.shapes.AbstractRectangleShape
|
+--com.rolemodelsoft.drawlet.shapes.rectangles.RectangleShape
|
+--com.rolemodelsoft.drawlet.examples.graphnode.GraphNode
Here is a simple example of a graph node figure.
| Field Summary | |
protected StringRenderer |
renderer
the renderer responsible for drawing the label. |
protected java.lang.String |
string
the label associated with this graphnode. |
protected java.awt.Color |
textColor
the color of the text in the graphnode. |
| Fields inherited from class com.rolemodelsoft.drawlet.shapes.AbstractRectangleShape |
height,
width,
x,
y |
| Fields inherited from class com.rolemodelsoft.drawlet.shapes.FilledShape |
fillColor,
lineColor |
| Fields inherited from class com.rolemodelsoft.drawlet.basics.AbstractFigure |
listeners,
locationListeners |
| Constructor Summary | |
GraphNode()
|
|
| Method Summary | |
protected ConnectedLineCreationHandle |
basicNewLineCreationHandle()
Answer a new line creation handle |
protected void |
changedShape(java.awt.Rectangle rect)
Denote that the shape changed. |
protected void |
changedSize(java.awt.Dimension dimension)
Denote that size changed. |
protected int |
defaultHeight()
Answer the default/initial value for height |
protected java.lang.String |
defaultString()
Answer the default/initial value for string |
protected java.awt.Color |
defaultTextColor()
Answer the default/initial value for textColor |
protected int |
defaultWidth()
Answer the default/initial value for width |
Handle |
editTool(int x,
int y)
Answers a Handle that will provide editing capabilities on the receiver. |
Handle[] |
getHandles()
Answer the handles associated with the receiver. |
java.awt.Rectangle |
getLabelBounds()
Returns the current bounds of the label. |
protected StringRenderer |
getRenderer()
Answer the renderer to paint the label. |
java.lang.String |
getString()
Answer the string the figure paints. |
DrawingStyle |
getStyle()
Answer the style which defines how to paint the figure. |
java.awt.Color |
getTextColor()
Answer the Color to use when drawing text. |
void |
paint(java.awt.Graphics g)
Paints the figure. |
void |
paintText(java.awt.Graphics original)
Paints the text. |
Locator |
requestConnection(Figure requestor,
int x,
int y)
Answers a Locator corresponding to a significant point on the receiver that will serve as a connection to the other figure. |
protected void |
resetSizeCache()
Flush caches with respect to determining size. |
void |
setString(java.lang.String newString)
Set the string the figure paints. |
void |
setStyle(DrawingStyle style)
Set the style defining how to paint the figure. |
void |
setTextColor(java.awt.Color color)
Set the Color to use when drawing text. |
| Methods inherited from class com.rolemodelsoft.drawlet.shapes.rectangles.RectangleShape |
paintFilled,
paintStrokes |
| Methods inherited from class com.rolemodelsoft.drawlet.shapes.AbstractRectangleShape |
basicMove,
basicReshape,
basicResize,
basicTranslate,
defaultX,
defaultY,
getBounds,
getSize |
| Methods inherited from class com.rolemodelsoft.drawlet.shapes.FilledShape |
defaultFillColor,
defaultLineColor,
getFillColor,
getLineColor,
isOpaque,
isStroked,
setFillColor,
setLineColor |
| Methods inherited from class com.rolemodelsoft.drawlet.shapes.AbstractShape |
resetBoundsCache,
reshapedPolygon,
reshapedPolygon,
setBounds,
setSize |
| Methods inherited from class com.rolemodelsoft.drawlet.basics.AbstractFigure |
addPropertyChangeListener,
addRelatedLocationListener,
changedLocation,
contains,
contains,
contains,
deleteLocationListeners,
disconnect,
duplicate,
duplicateIn,
estimatedDuplicateSize,
figureFromLocator,
fireLocationChange,
firePropertyChange,
firePropertyChange,
fireRelationChange,
fireShapeChange,
fireSizeChange,
getLocation,
getLocator,
intersects,
intersects,
isObsolete,
isWithin,
isWithin,
locatorAt,
move,
move,
postDuplicate,
relatedLocationListeners,
removePropertyChangeListener,
removeRelatedLocationListener,
resetLocationCache,
setSize,
translate |
| Methods inherited from class com.rolemodelsoft.drawlet.basics.AbstractPaintable |
getBottom,
getHeight,
getLeft,
getRight,
getTop,
getWidth |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected java.lang.String string
protected java.awt.Color textColor
protected transient StringRenderer renderer
| Constructor Detail |
public GraphNode()
| Method Detail |
protected ConnectedLineCreationHandle basicNewLineCreationHandle()
protected void changedShape(java.awt.Rectangle rect)
rect - the old bounds.protected void changedSize(java.awt.Dimension dimension)
dimension - the old dimensions.protected int defaultHeight()
protected java.lang.String defaultString()
protected java.awt.Color defaultTextColor()
protected int defaultWidth()
public Handle editTool(int x,
int y)
x - the x coordinate to potentially begin editingy - the y coordinate to potentially begin editingpublic Handle[] getHandles()
public java.awt.Rectangle getLabelBounds()
protected StringRenderer getRenderer()
public java.lang.String getString()
public DrawingStyle getStyle()
public java.awt.Color getTextColor()
public void paint(java.awt.Graphics g)
g - the specified Graphics windowpublic void paintText(java.awt.Graphics original)
g - the specified Graphics window
public Locator requestConnection(Figure requestor,
int x,
int y)
x - the x coordinate of the requested locatory - the y coordinate of the requested locatorprotected void resetSizeCache()
public void setString(java.lang.String newString)
newString - the string to paintpublic void setStyle(DrawingStyle style)
style - the specified DrawingStylepublic void setTextColor(java.awt.Color color)
color - the color
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||