|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.option.RealizerCellRenderer.EdgeRealizerIcon
public static class RealizerCellRenderer.EdgeRealizerIcon
A special icon that renders an edge realizer
Constructor Summary | |
---|---|
RealizerCellRenderer.EdgeRealizerIcon(EdgeRealizer realizer,
int width,
int height)
Creates an icon for the given realizer. |
Method Summary | |
---|---|
protected YPoint |
calculateSourceBend(EdgeRealizer realizer,
int iconWidth,
int iconHeight)
Calculates the location of the first control point in the displayed edge visualization. |
protected YPoint |
calculateTargetBend(EdgeRealizer realizer,
int iconWidth,
int iconHeight)
Calculates the location of the second control point in the displayed edge visualization. |
int |
getIconHeight()
Returns the height of this icon. |
int |
getIconWidth()
Returns the width of this icon. |
boolean |
isDrawingBends()
Returns true if the bends of the realizer are drawn. |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Draws the icon at the specified location. |
protected void |
paintRealizer(EdgeRealizer er,
java.awt.Graphics2D gfx)
Paints the given edge realizer. |
void |
setDrawingBends(boolean drawingBends)
Sets whether the bends of the realizer are drawn. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RealizerCellRenderer.EdgeRealizerIcon(EdgeRealizer realizer, int width, int height)
realizer
- the realizer to create an icon forwidth
- the width of the iconheight
- the height of the iconMethod Detail |
---|
public boolean isDrawingBends()
setDrawingBends(boolean)
public void setDrawingBends(boolean drawingBends)
drawingBends
- if true the bends are drawnisDrawingBends()
protected YPoint calculateSourceBend(EdgeRealizer realizer, int iconWidth, int iconHeight)
[0, iconWidth]x[0, iconHeight]
.
realizer
- the displayed edge visualization.iconWidth
- the width of the icon.iconHeight
- the height of the icon.
protected YPoint calculateTargetBend(EdgeRealizer realizer, int iconWidth, int iconHeight)
[0, iconWidth]x[0, iconHeight]
.
realizer
- the displayed edge visualization.iconWidth
- the width of the icon.iconHeight
- the height of the icon.
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintRealizer(y.view.EdgeRealizer, java.awt.Graphics2D)
.
paintIcon
in interface javax.swing.Icon
c
- ignoredg
- the graphics context to draw upon.x
- x-coordinate of the icon's location.y
- y-coordinate of the icon's location.protected void paintRealizer(EdgeRealizer er, java.awt.Graphics2D gfx)
Called from paintIcon(java.awt.Component, java.awt.Graphics, int, int)
.
The calling method will dispose the graphics context afterwards.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |