ChartCat 1.2

li.netcat.chart.util
Class DefaultLayout

java.lang.Object
  extended byli.netcat.chart.util.elem.ElementLayout
      extended byli.netcat.chart.util.DefaultLayout
All Implemented Interfaces:
IteratableLayout, Layout

public class DefaultLayout
extends ElementLayout

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.

Author:
Arthur Marxer

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

TOP

public static final int TOP
Equal to ChartConstants.TOP

See Also:
Constant Field Values

LEFT

public static final int LEFT
Equal to ChartConstants.LEFT

See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
Equal to ChartConstants.BOTTOM

See Also:
Constant Field Values

RIGHT

public static final int RIGHT
Equal to ChartConstants.RIGHT

See Also:
Constant Field Values

CENTER

public static final int CENTER
Equal to ChartConstants.CENTER

See Also:
Constant Field Values

BASELINE

public static final int BASELINE
Equal to ChartConstants.BASELINE

See Also:
Constant Field Values
Constructor Detail

DefaultLayout

public DefaultLayout()
Constructs a new and empty DefaultLayout.

Method Detail

addText

public void addText(DeviceString text,
                    TextLook textLook,
                    float x,
                    float y)
Adds a text to this layout. This method uses LEFT as horizontal alignment and BASELINE as vertical alignment.

Parameters:
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.

addText

public void addText(DeviceString text,
                    TextLook textLook,
                    float x,
                    float y,
                    int hAlign,
                    int vAlign)
Adds a text to this layout.

Parameters:
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..

addText

public void addText(DeviceString text,
                    TextLook textLook,
                    float x,
                    float y,
                    int hAlign,
                    int vAlign,
                    double angle)
Adds a text to this layout.

Parameters:
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.

addText

public 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.

Parameters:
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.
See Also:
PerspectivePart

addText

public 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.

Parameters:
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.
See Also:
PerspectivePart

addLines

public void addLines(java.awt.Shape lines,
                     Pen pen)
Adds an arbitrary number of lines to this layout in the form of a shape.

Parameters:
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.

addLines

public 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.

Parameters:
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.
See Also:
PerspectivePart

addLines

public 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.

Parameters:
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.
See Also:
PerspectivePart

addSymbol

public void addSymbol(java.awt.Shape symbol,
                      java.awt.Paint paint,
                      float x,
                      float y)
Adds a reference symbol (small shape) to this layout.

Parameters:
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.

addSymbol

public 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.

Parameters:
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.
See Also:
PerspectivePart

addSymbol

public 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.

Parameters:
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.
See Also:
PerspectivePart

addArea

public void addArea(java.awt.Shape area,
                    Pen pen)
Adds an area to this layout.

Parameters:
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.

addArea

public void addArea(java.awt.Shape area,
                    Pen pen,
                    java.lang.Object perspective)
Adds an area to this layout.

Parameters:
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.
See Also:
PerspectivePart

addArea

public void addArea(java.awt.Shape area,
                    Pen pen,
                    java.lang.Object perspective,
                    LogicalPoint point)
Adds an area to this layout.

Parameters:
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.
See Also:
PerspectivePart

ChartCat 1.2

Copyright © 2003 - 2005 NetCat Inc.. All rights reserved. Feedback

Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print