ChartCat 1.2

li.netcat.chart.util
Class CartesianInscribePart

java.lang.Object
  extended byli.netcat.chart.util.AbstractPart
      extended byli.netcat.chart.util.TextPart
          extended byli.netcat.chart.util.TagPart
              extended byli.netcat.chart.util.InscribePart
                  extended byli.netcat.chart.util.CartesianInscribePart
All Implemented Interfaces:
Part

public class CartesianInscribePart
extends InscribePart

Represents a straight inscription that looks for example like this:

It can be used to tag a Cartesian graph part. This part uses the tag concept and is therefore very flexible in its strategy and layout. For more details, see the super class TagPart.

The Cartesian value part can be positioned at the top, left, bottom or right of a Cartesian graph part. Be aware that this part might take a lot of space and use a lot of lines depending on the number of data elements.

Author:
Arthur Marxer

Field Summary
static int BOTTOM
          Equal to ChartConstants.BOTTOM
static int LEFT
          Equal to ChartConstants.LEFT
static int RIGHT
          Equal to ChartConstants.RIGHT
static int TOP
          Equal to ChartConstants.TOP
 
Fields inherited from class li.netcat.chart.util.AbstractPart
BACKGROUND, FOREGROUND, PERSPECTIVE
 
Constructor Summary
CartesianInscribePart(CartesianGraphPart cartesianGraphPart)
          Constructs a new CartesianInscribePart that tags the given graph part.
 
Method Summary
 CartesianGraphPart getCartesianGraphPart()
          Returns the Cartesian graph part that gets decorated by this tag part.
 int getPosition()
          Returns the position of this tag part.
 TagConstraints getTagConstraints(java.awt.Graphics g)
          This overridden method returns the tag constraints that are used to position all labels.
 void setCartesianGraphPart(CartesianGraphPart cartesianGraphPart)
          Sets the Cartesian graph part that gets decorated by this tag part.
 void setGraphPart(GraphPart graphPart)
          Overrides the method of the super class and makes sure that the part is always of instance CartesianGraphPart.
 void setPosition(int position)
          Sets the position of this tag part.
 
Methods inherited from class li.netcat.chart.util.InscribePart
getCrosswisePosition, getCrosswiseShift, getGraphPart, getLengthwisePosition, getLengthwiseShift, getTags, setTargetPosition
 
Methods inherited from class li.netcat.chart.util.TagPart
createTag, createTag, createTag, getAdditionalLineLength, getBottom, getLayout, getLeft, getLinePenBox, getPen, getRight, getTagManager, getTextPenBox, getTop, setAdditionalLineLength, setInsets, setLinePenBox, setPen, setTagManager, setTextPenBox
 
Methods inherited from class li.netcat.chart.util.TextPart
getTextLook, setTextLook
 
Methods inherited from class li.netcat.chart.util.AbstractPart
getChart, getPerspective, invalidate, setChart, setPerspective
 
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
Constructor Detail

CartesianInscribePart

public CartesianInscribePart(CartesianGraphPart cartesianGraphPart)
Constructs a new CartesianInscribePart that tags the given graph part.

Parameters:
cartesianGraphPart - The part that gets tagged, might also be null.
Method Detail

getPosition

public int getPosition()
Returns the position of this tag part.

Returns:
One of TOP, LEFT, BOTTOM or RIGHT.

setPosition

public void setPosition(int position)
Sets the position of this tag part.

Parameters:
position - Specify one of TOP, LEFT, BOTTOM or RIGHT.

getCartesianGraphPart

public CartesianGraphPart getCartesianGraphPart()
Returns the Cartesian graph part that gets decorated by this tag part.

Returns:
The graph part, might also be null.

setCartesianGraphPart

public void setCartesianGraphPart(CartesianGraphPart cartesianGraphPart)
Sets the Cartesian graph part that gets decorated by this tag part.

Parameters:
cartesianGraphPart - The Cartesian graph part or null.

setGraphPart

public void setGraphPart(GraphPart graphPart)
Overrides the method of the super class and makes sure that the part is always of instance CartesianGraphPart. Use the method setCartesianGraphPart(CartesianGraphPart) for a better compile time safety.

Overrides:
setGraphPart in class InscribePart
Parameters:
graphPart - The graph part. It must be of instance CartesianGraphPart or null.

getTagConstraints

public TagConstraints getTagConstraints(java.awt.Graphics g)
This overridden method returns the tag constraints that are used to position all labels.

Specified by:
getTagConstraints in class TagPart
Parameters:
g - The relevant graphics object.
Returns:
An instance of LineTagConstraints depending on the position.

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