|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.base.node.viz.aggregation.DrawingUtils
public final class DrawingUtils
Utility class that eases the drawing of different shapes.
| Method Summary | |
|---|---|
static Arc2D |
calculateBorderArc(Arc2D arc,
BasicStroke stroke)
Calculates the size of the arc with the given stroke. |
static Rectangle2D |
calculateBorderRect(Rectangle2D rect,
BasicStroke stroke)
Calculates the size of the rectangle with the given stroke. |
static void |
drawArc(Graphics2D g2,
Arc2D arc,
Paint paint,
BasicStroke stroke)
Draws the outline of the given arc. |
static void |
drawBlock(Graphics2D g2,
Shape shape,
Paint paint)
Draws a filled rectangle without a border and default transparency. |
static void |
drawBlock(Graphics2D g2,
Shape shape,
Paint paint,
float alpha)
Draws a filled shape without a border. |
static void |
drawMessage(Graphics2D g2,
Font font,
String msg,
Rectangle2D bounds)
Draws the given message in the center of the given rectangle. |
static void |
drawOutline(Graphics2D g2,
Shape shape,
Paint paint,
Stroke stroke)
Draws the outline of the shape. |
static void |
drawRectangle(Graphics2D g2,
Rectangle2D rect,
Color color,
BasicStroke stroke)
Draws an empty rectangle. |
static void |
paintHorizontalLine(Graphics2D g2,
int xOffset,
int yOffset,
int lineWidth,
Color color,
BasicStroke stroke)
Draws a horizontal line starting at the given x/y offset with the given length. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void drawMessage(Graphics2D g2,
Font font,
String msg,
Rectangle2D bounds)
g2 - the graphic object to usefont - the fontmsg - the messagebounds - the boundary to write in
public static void paintHorizontalLine(Graphics2D g2,
int xOffset,
int yOffset,
int lineWidth,
Color color,
BasicStroke stroke)
g2 - the graphics object to usexOffset - the x offset of the lineyOffset - the y offset of the linelineWidth - the width of the linecolor - the drawing colorstroke - the stroke to use
public static void drawBlock(Graphics2D g2,
Shape shape,
Paint paint)
g2 - the graphic objectshape - the shape to fillpaint - the filling color or TexturePaint
public static void drawBlock(Graphics2D g2,
Shape shape,
Paint paint,
float alpha)
g2 - the graphic objectshape - the shape to fillpaint - the filling color or TexturePaintalpha - the transparency
public static void drawOutline(Graphics2D g2,
Shape shape,
Paint paint,
Stroke stroke)
g2 - the graphic objectshape - the shape to drawpaint - the filling color or TexturePaintstroke - the Stroke to use
public static void drawArc(Graphics2D g2,
Arc2D arc,
Paint paint,
BasicStroke stroke)
g2 - the graphic objectarc - the arc to drawpaint - the filling color or TexturePaintstroke - the Stroke to use
public static void drawRectangle(Graphics2D g2,
Rectangle2D rect,
Color color,
BasicStroke stroke)
g2 - the graphics objectrect - the rectangle to drawcolor - the Color of the rectangle borderstroke - the BasicStroke to use
public static Rectangle2D calculateBorderRect(Rectangle2D rect,
BasicStroke stroke)
rect - the original size of the rectanglestroke - the stroke which will be used to draw the rectangle
Rectangle2D to draw
public static Arc2D calculateBorderArc(Arc2D arc,
BasicStroke stroke)
arc - the original size of the arcstroke - the stroke which will be used to draw the arc
Arc2D to draw
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||