ChartCat 1.2

li.netcat.chart.util.tag
Class BasicTagManager

java.lang.Object
  extended byli.netcat.chart.util.tag.BasicTagManager
All Implemented Interfaces:
TagManager

public class BasicTagManager
extends java.lang.Object
implements TagManager

Basic implementation of a TagManager. This manager does not use any line to connect the text with the target point. It also does not handle overlaps of tags. The text alignment and the angle can be specified.

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
BasicTagManager()
          Constructs a new BasicTagManager with its default properties.
BasicTagManager(int horizontalTextAlignment, int verticalTextAlignment, float angleDegrees)
          Constructs a new BasicTagManager using the given text alignment and angle.
 
Method Summary
 float getAngleDegrees()
          Returns the angle in degrees.
 int getHorizontalTextAlignment()
          Returns the horizontal text alignment.
 Layout getLayout(TagPart tagPart, java.awt.Graphics g)
          Handles overlaps of the given labels and calculates the resulting layout.
 int getVerticalTextAlignment()
          Returns the vertical text alignment.
 void setAngleDegrees(float angleDegrees)
          Sets the angle in degrees.
 void setHorizontalTextAlignment(int horizontalTextAlignment)
          Sets the horizontal text alignment.
 void setVerticalTextAlignment(int verticalTextAlignment)
          Sets the vertical text alignment.
 
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

BasicTagManager

public BasicTagManager()
Constructs a new BasicTagManager with its default properties.


BasicTagManager

public BasicTagManager(int horizontalTextAlignment,
                       int verticalTextAlignment,
                       float angleDegrees)
Constructs a new BasicTagManager using the given text alignment and angle.

Parameters:
horizontalTextAlignment - Specify one of LEFT, CENTER or RIGHT.
verticalTextAlignment - Specify one of TOP, CENTER, BASELINE or BOTTOM.
angleDegrees - The angle in degrees. Horizontal is specified with 0.0f and vertical with 90.0f (turn anticlockwise).
Method Detail

getHorizontalTextAlignment

public int getHorizontalTextAlignment()
Returns the horizontal text alignment.

Returns:
One of LEFT, CENTER or RIGHT.

setHorizontalTextAlignment

public void setHorizontalTextAlignment(int horizontalTextAlignment)
Sets the horizontal text alignment.

Parameters:
horizontalTextAlignment - Specify one of LEFT, CENTER or RIGHT.

getVerticalTextAlignment

public int getVerticalTextAlignment()
Returns the vertical text alignment.

Returns:
One of TOP, CENTER, BASELINE or BOTTOM.

setVerticalTextAlignment

public void setVerticalTextAlignment(int verticalTextAlignment)
Sets the vertical text alignment.

Parameters:
verticalTextAlignment - Specify one of TOP, CENTER, BASELINE or BOTTOM.

getAngleDegrees

public float getAngleDegrees()
Returns the angle in degrees. Horizontal is specified with 0.0f and vertical with 90.0f (turn anticlockwise).

Returns:
The angle in degrees.

setAngleDegrees

public void setAngleDegrees(float angleDegrees)
Sets the angle in degrees. Horizontal is specified with 0.0f and vertical with 90.0f (turn anticlockwise).


getLayout

public Layout getLayout(TagPart tagPart,
                        java.awt.Graphics g)
Description copied from interface: TagManager
Handles overlaps of the given labels and calculates the resulting layout.

Specified by:
getLayout in interface TagManager
Parameters:
tagPart - The tag part that havs to be layouted, never null.
Returns:
The calculated layout.

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