|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.imagero.swing.shape.Shapes
Utility class for creating some useful shapes
| Field Summary | |
static int |
EAST
|
static int |
NORTH
|
static int |
SOUTH
|
static double |
sqrt3_2
|
static int |
WEST
|
| Constructor Summary | |
Shapes()
|
|
| Method Summary | |
static java.awt.Point |
computeMedian(java.awt.geom.Area area)
Compute median point of triangle |
static java.awt.Point |
computeMedian(java.awt.Point A,
java.awt.Point B,
java.awt.Point C)
compute median point of triangle |
static java.awt.geom.Area |
createArrow(int width,
int length,
int direction)
create arrow (<===) |
static java.awt.geom.Area |
createArrow(int width,
int height,
int length,
int direction)
create arrow (<===) |
static java.awt.geom.Area |
createCircle(double size)
|
static java.awt.geom.Area |
createCircle(double offset,
double size)
|
static java.awt.geom.Area |
createCircle(double x,
double y,
double size)
|
static java.awt.geom.Area |
createCruz(int x,
int y,
int width,
int height,
int w)
|
static java.awt.geom.Area |
createEllipce(double offset,
double width,
double height)
|
static java.awt.geom.Area |
createEllipce(double x,
double y,
double width,
double height)
|
static java.awt.geom.Area |
createEquilateralTriangle(double size,
int direction)
Create equilateral triangle |
static java.awt.geom.Area |
createEquilateralTriangle(int size,
int direction)
Create equilateral triangle |
static java.awt.geom.Area |
createIsoscelesTriangle(double base,
double height,
int direction)
create isosceles triangle |
static java.awt.geom.Area |
createIsoscelesTriangle(int size,
int direction)
Create isosceles triangle. |
static java.awt.geom.Area |
createQuadArrow(int width,
int length)
create area with 4 arrows looking at NORTH, SOUTH, EAST and WEST |
static java.awt.geom.Area |
createQuadArrow(int width,
int height,
int length)
create area with 4 arrows looking at NORTH, SOUTH, EAST and WEST |
static java.awt.geom.Area |
createQuadRightArrow(int width,
int length)
create area with 4 arrows looking at NORTH, SOUTH, EAST and WEST (all arrows with 90° angle) |
static java.awt.geom.Area |
createRect(double size)
|
static java.awt.geom.Area |
createRect(double offset,
double size)
|
static java.awt.geom.Area |
createRect(double x,
double y,
double width,
double height)
|
static java.awt.geom.Area |
createRightArrow(int width,
int length,
int direction)
create arrow which triangle has 90° angle (<===) |
static java.awt.geom.Area |
createRightTriangle(double size,
int direction)
Create orthogonal triangle. |
static java.awt.geom.Area |
createRoundRect(double size)
|
static java.awt.geom.Area |
createRoundRect(double offset,
double size)
|
static java.awt.geom.Area |
createRoundRect(double offset,
double size,
double arc)
|
static java.awt.geom.Area |
createRoundRect(double x,
double y,
double width,
double height,
double arc)
|
static java.awt.Shape |
createShape(java.lang.String text,
java.awt.Font font)
create shape from given String und Font |
static java.awt.Shape |
createShape(java.lang.String text,
java.awt.Font font,
java.awt.geom.AffineTransform at)
create shape from given String, Font and AffineTransform |
static java.awt.Shape |
createShape(java.lang.String text,
java.awt.Font font,
java.awt.geom.AffineTransform at,
boolean isAntiAliased,
boolean usesFractionMetrics)
create shape from given String, Font and AffineTransform |
static java.awt.Shape |
createShape(java.lang.String text,
java.awt.Font font,
java.awt.font.FontRenderContext frc)
create shape from given String, Font and FontRenderContext |
static java.awt.geom.Area |
createTwinArrow(int width,
int length,
int direction)
create arrow with 2 vertex (<====>) |
static java.awt.geom.Area |
createTwinArrow(int width,
int height,
int length,
int direction)
create arrow with 2 vertex (<====>) |
static java.awt.geom.Area |
createTwinRightArrow(int width,
int length,
int direction)
create arrow with 2 vertex, both with 90° angle (<====>) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int NORTH
public static final int SOUTH
public static final int WEST
public static final int EAST
public static final double sqrt3_2
| Constructor Detail |
public Shapes()
| Method Detail |
public static java.awt.geom.Area createRect(double size)
public static java.awt.geom.Area createRect(double offset,
double size)
public static java.awt.geom.Area createRect(double x,
double y,
double width,
double height)
public static java.awt.geom.Area createRoundRect(double size)
public static java.awt.geom.Area createRoundRect(double offset,
double size)
public static java.awt.geom.Area createRoundRect(double offset,
double size,
double arc)
public static java.awt.geom.Area createRoundRect(double x,
double y,
double width,
double height,
double arc)
public static java.awt.geom.Area createCircle(double size)
public static java.awt.geom.Area createCircle(double offset,
double size)
public static java.awt.geom.Area createCircle(double x,
double y,
double size)
public static java.awt.geom.Area createCruz(int x,
int y,
int width,
int height,
int w)
public static java.awt.geom.Area createEllipce(double offset,
double width,
double height)
public static java.awt.geom.Area createEllipce(double x,
double y,
double width,
double height)
public static java.awt.geom.Area createIsoscelesTriangle(double base,
double height,
int direction)
base - base lengthheight - height of isosceles triangle
public static java.awt.geom.Area createIsoscelesTriangle(int size,
int direction)
public static java.awt.geom.Area createRightTriangle(double size,
int direction)
public static java.awt.geom.Area createEquilateralTriangle(double size,
int direction)
public static java.awt.geom.Area createEquilateralTriangle(int size,
int direction)
public static java.awt.Point computeMedian(java.awt.Point A,
java.awt.Point B,
java.awt.Point C)
A - first pointB - second pointC - third point
public static java.awt.Point computeMedian(java.awt.geom.Area area)
area - Area (should have only 3 points
public static java.awt.geom.Area createArrow(int width,
int length,
int direction)
width - size of arrow's trianglelength - length of the arrowdirection - direction of arrow (NORTH, SOUTH, EAST or WEST)
public static java.awt.geom.Area createRightArrow(int width,
int length,
int direction)
width - width of arrow's trianglelength - length of the arrowdirection - direction of arrow (NORTH, SOUTH, EAST or WEST)
public static java.awt.geom.Area createArrow(int width,
int height,
int length,
int direction)
width - width of arrow's triangleheight - height of arrow's trianglelength - length of arrowdirection - direction of arrow (NORTH, SOUTH, EAST or WEST)
public static java.awt.geom.Area createTwinArrow(int width,
int length,
int direction)
width - width of arrow's trianglelength - length of arrowdirection - direction of arrow (NORTH, SOUTH, EAST or WEST)
public static java.awt.geom.Area createTwinRightArrow(int width,
int length,
int direction)
width - width of arrow's trianglelength - length of arrowdirection - direction of arrow (NORTH, SOUTH, EAST or WEST)
public static java.awt.geom.Area createTwinArrow(int width,
int height,
int length,
int direction)
width - width of arrow's triangleheight - height of arrow's trianglelength - length of arrowdirection - direction of arrow (NORTH, SOUTH, EAST or WEST)
public static java.awt.geom.Area createQuadArrow(int width,
int length)
width - width of arrow's trianglelength - length of arrow
public static java.awt.geom.Area createQuadRightArrow(int width,
int length)
width - width of arrow's trianglelength - length of arrow
public static java.awt.geom.Area createQuadArrow(int width,
int height,
int length)
width - width of arrow's triangleheight - length of arrow's trianglelength - length of arrow
public static java.awt.Shape createShape(java.lang.String text,
java.awt.Font font)
public static java.awt.Shape createShape(java.lang.String text,
java.awt.Font font,
java.awt.geom.AffineTransform at)
public static java.awt.Shape createShape(java.lang.String text,
java.awt.Font font,
java.awt.geom.AffineTransform at,
boolean isAntiAliased,
boolean usesFractionMetrics)
public static java.awt.Shape createShape(java.lang.String text,
java.awt.Font font,
java.awt.font.FontRenderContext frc)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||