|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectli.netcat.chart.util.elem.ElementLayout
li.netcat.chart.util.DefaultLayout
Default implementation of the Layout
interface. It is possible to add an arbitrary
number of text, lines, symbols and areas to this layout. This layout automatically calculates
the bounds and is able to paint its content.
Field Summary | |
static int |
BASELINE
Equal to ChartConstants.BASELINE |
static int |
BOTTOM
Equal to ChartConstants.BOTTOM |
static int |
CENTER
Equal to ChartConstants.CENTER |
static int |
LEFT
Equal to ChartConstants.LEFT |
static int |
RIGHT
Equal to ChartConstants.RIGHT |
static int |
TOP
Equal to ChartConstants.TOP |
Constructor Summary | |
DefaultLayout()
Constructs a new and empty DefaultLayout . |
Method Summary | |
void |
addArea(java.awt.Shape area,
Pen pen)
Adds an area to this layout. |
void |
addArea(java.awt.Shape area,
Pen pen,
java.lang.Object perspective)
Adds an area to this layout. |
void |
addArea(java.awt.Shape area,
Pen pen,
java.lang.Object perspective,
LogicalPoint point)
Adds an area to this layout. |
void |
addLines(java.awt.Shape lines,
Pen pen)
Adds an arbitrary number of lines to this layout in the form of a shape. |
void |
addLines(java.awt.Shape lines,
Pen pen,
java.lang.Object perspective)
Adds an arbitrary number of lines to this layout in the form of a shape. |
void |
addLines(java.awt.Shape lines,
Pen pen,
java.lang.Object perspective,
LogicalPoint point)
Adds an arbitrary number of lines to this layout in the form of a shape. |
void |
addSymbol(java.awt.Shape symbol,
java.awt.Paint paint,
float x,
float y)
Adds a reference symbol (small shape) to this layout. |
void |
addSymbol(java.awt.Shape symbol,
java.awt.Paint paint,
float x,
float y,
java.lang.Object perspective)
Adds a reference symbol (small shape) to this layout. |
void |
addSymbol(java.awt.Shape symbol,
java.awt.Paint paint,
float x,
float y,
java.lang.Object perspective,
LogicalPoint point)
Adds a reference symbol (small shape) to this layout. |
void |
addText(DeviceString text,
TextLook textLook,
float x,
float y)
Adds a text to this layout. |
void |
addText(DeviceString text,
TextLook textLook,
float x,
float y,
int hAlign,
int vAlign)
Adds a text to this layout. |
void |
addText(DeviceString text,
TextLook textLook,
float x,
float y,
int hAlign,
int vAlign,
double angle)
Adds a text to this layout. |
void |
addText(DeviceString text,
TextLook textLook,
float x,
float y,
int hAlign,
int vAlign,
double angle,
java.lang.Object perspective)
Adds a text to this layout. |
void |
addText(DeviceString text,
TextLook textLook,
float x,
float y,
int hAlign,
int vAlign,
double angle,
java.lang.Object perspective,
LogicalPoint point)
Adds a text to this layout. |
Methods inherited from class li.netcat.chart.util.elem.ElementLayout |
addElement, addElement, addToBounds, addToBounds, getBounds, getBounds2D, getElements, getLogicalPoint, paint |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TOP
ChartConstants.TOP
public static final int LEFT
ChartConstants.LEFT
public static final int BOTTOM
ChartConstants.BOTTOM
public static final int RIGHT
ChartConstants.RIGHT
public static final int CENTER
ChartConstants.CENTER
public static final int BASELINE
ChartConstants.BASELINE
Constructor Detail |
public DefaultLayout()
DefaultLayout
.
Method Detail |
public void addText(DeviceString text, TextLook textLook, float x, float y)
LEFT
as horizontal alignment and BASELINE
as vertical alignment.
text
- The text to be added, not null
.textLook
- The look of the text, not null
.x
- The x-coordinate of the anchor point.y
- The y-coordinate of the anchor point.public void addText(DeviceString text, TextLook textLook, float x, float y, int hAlign, int vAlign)
text
- The text to be added, not null
.textLook
- The look of the text, not null
.x
- The x-coordinate of the anchor point.y
- The y-coordinate of the anchor point.hAlign
- The horizontal alignment, specify one of LEFT
, CENTER
or RIGHT
.vAlign
- The vertical alignment, specify one of TOP
, CENTER
, BASELINE
or BOTTOM
..public void addText(DeviceString text, TextLook textLook, float x, float y, int hAlign, int vAlign, double angle)
text
- The text to be added, not null
.textLook
- The look of the text, not null
.x
- The x-coordinate of the anchor point.y
- The y-coordinate of the anchor point.hAlign
- The horizontal alignment, specify one of LEFT
, CENTER
or RIGHT
.vAlign
- The vertical alignment, specify one of TOP
, CENTER
, BASELINE
or BOTTOM
..angle
- The angle of the text in radians. 0 refers to horizontal text.public void addText(DeviceString text, TextLook textLook, float x, float y, int hAlign, int vAlign, double angle, java.lang.Object perspective)
text
- The text to be added, not null
.textLook
- The look of the text, not null
.x
- The x-coordinate of the anchor point.y
- The y-coordinate of the anchor point.hAlign
- The horizontal alignment, specify one of LEFT
, CENTER
or RIGHT
.vAlign
- The vertical alignment, specify one of TOP
, CENTER
, BASELINE
or BOTTOM
..angle
- The angle of the text in radians. 0 refers to horizontal text.perspective
- The perspective position of this element.PerspectivePart
public void addText(DeviceString text, TextLook textLook, float x, float y, int hAlign, int vAlign, double angle, java.lang.Object perspective, LogicalPoint point)
text
- The text to be added, not null
.textLook
- The look of the text, not null
.x
- The x-coordinate of the anchor point.y
- The y-coordinate of the anchor point.hAlign
- The horizontal alignment, specify one of LEFT
, CENTER
or RIGHT
.vAlign
- The vertical alignment, specify one of TOP
, CENTER
, BASELINE
or BOTTOM
..angle
- The angle of the text in radians. 0 refers to horizontal text.perspective
- The perspective position of this element.point
- The logic point that corresponds to this text or null
.PerspectivePart
public void addLines(java.awt.Shape lines, Pen pen)
lines
- The definition of the lines, not null
.pen
- The pen to paint the lines, not null
. The fill color is used to fill the lines in
a perspective view.public void addLines(java.awt.Shape lines, Pen pen, java.lang.Object perspective)
lines
- The definition of the lines, not null
.pen
- The pen to paint the lines, not null
. The fill color is used to fill the lines in
a perspective view.perspective
- The perspective position of this element.PerspectivePart
public void addLines(java.awt.Shape lines, Pen pen, java.lang.Object perspective, LogicalPoint point)
lines
- The definition of the lines, not null
.pen
- The pen to paint the lines, not null
. The fill color is used to fill the lines in
a perspective view.perspective
- The perspective position of this element.point
- The logic point that corresponds to this text or null
.PerspectivePart
public void addSymbol(java.awt.Shape symbol, java.awt.Paint paint, float x, float y)
symbol
- The symbol that gets added, not null
.paint
- The paint used to fill the symbol, not null
.x
- The x-coordinate of the center of the symbol.y
- The y-coordinate of the center of the symbol.public void addSymbol(java.awt.Shape symbol, java.awt.Paint paint, float x, float y, java.lang.Object perspective)
symbol
- The symbol that gets added, not null
.paint
- The paint used to fill the symbol, not null
.x
- The x-coordinate of the center of the symbol.y
- The y-coordinate of the center of the symbol.perspective
- The perspective position of this element.PerspectivePart
public void addSymbol(java.awt.Shape symbol, java.awt.Paint paint, float x, float y, java.lang.Object perspective, LogicalPoint point)
symbol
- The symbol that gets added, not null
.paint
- The paint used to fill the symbol, not null
.x
- The x-coordinate of the center of the symbol.y
- The y-coordinate of the center of the symbol.perspective
- The perspective position of this element.point
- The logic point that corresponds to this text or null
.PerspectivePart
public void addArea(java.awt.Shape area, Pen pen)
area
- The area to be added, not null
.pen
- The pen that is used to fill the are and draw the bounds of the area, not null
.public void addArea(java.awt.Shape area, Pen pen, java.lang.Object perspective)
area
- The area to be added, not null
.pen
- The pen that is used to fill the are and draw the bounds of the area, not null
.perspective
- The perspective position of this element.PerspectivePart
public void addArea(java.awt.Shape area, Pen pen, java.lang.Object perspective, LogicalPoint point)
area
- The area to be added, not null
.pen
- The pen that is used to fill the are and draw the bounds of the area, not null
.perspective
- The perspective position of this element.point
- The logic point that corresponds to this text or null
.PerspectivePart
|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |