Style Intelligence v12.0

inetsoft.graph
Class AxisSpec

java.lang.Object
  extended by inetsoft.graph.AxisSpec
All Implemented Interfaces:
Serializable, Cloneable

public class AxisSpec
extends Object
implements Cloneable, Serializable

This class holds the attributes used for creating an axis for a scale.

See Also:
Serialized Form

Field Summary
static int AXIS_CROSS
          Place the axis at the zero position of the cross axis.
static int AXIS_DOUBLE
          Create two axes for each scale, with one opposite the default axis.
static int AXIS_DOUBLE2
          Create two axes and display the label on the secondary axis.
static int AXIS_NONE
          No axis on this coord.
static int AXIS_SINGLE
          Use a single axis for each scale.
static int AXIS_SINGLE2
          Use the secondary axis.
 
Constructor Summary
AxisSpec()
          Create a new AxisSpec.
 
Method Summary
 Object clone()
          Make a copy of the spec.
 double getAxisSize()
          Get the fixed size of the axis.
 int getAxisStyle()
          Get the axis style for this coord.
 Color getGridColor()
          Get the grid line color.
 int getGridStyle()
          Get the grid line style.
 Color getLineColor()
          Get the axis line color.
 TextFrame getTextFrame()
          Get a text frame for mapping scale values to axis label.
 TextSpec getTextSpec()
          Get axis label text formatting attributes.
 boolean isAbbreviate()
          Check whether label should be abbreviated.
 boolean isAllTicks()
          Check whether to include ticks whose labels are ignored by abbreviation.
 boolean isGridAsShape()
          Check if grid lines are treated as shapes or positions.
 boolean isGridOnTop()
          Check whether grid lines should be drawn on top of visual objects.
 boolean isInPlot()
          Check if space should be reserved for the max label.
 boolean isLabelVisible()
          Get the axis label visibility.
 boolean isLineVisible()
          Get the axis line visibility.
 boolean isTickVisible()
          Get the axis ticks visibility.
 boolean isTruncate()
          Check whether label could be truncated with "..".
 void setAbbreviate(boolean abbr)
          Set label abbreviation.
 void setAllTicks(boolean allTick)
          Set whether to include ticks whose labels are ignored by abbreviation.
 void setAxisSize(double size)
          Set the fixed size of the axis.
 void setAxisStyle(int style)
          Set the axis style.
 void setGridAsShape(boolean asShape)
          Set whether grid lines are treated as shapes or positions.
 void setGridColor(Color gridColor)
          Set the grid line color.
 void setGridOnTop(boolean top)
          Set whether grid lines should be drawn on top of visual objects.
 void setGridStyle(int gridStyle)
          Set the grid line style, e.g., GraphConstants.DOT_LINE.
 void setInPlot(boolean inside)
          Set whether space should be reserved for the max label so it doesn't need to be moved to be fit inside the plot.
 void setLabelVisible(boolean labelVisible)
          Set the axis label visibility.
 void setLineColor(Color lineColor)
          Set the axis line color property.
 void setLineVisible(boolean lineVisible)
          Set the axis line visibility.
 void setTextFrame(TextFrame textFrame)
          Set a text frame to map scale values to axis labels.
 void setTextSpec(TextSpec textSpec)
          Set axis label text formatting attributes.
 void setTickVisible(boolean tickVisible)
          Set the axis ticks visibility.
 void setTruncate(boolean truncated)
          Set whethert label could be truncated.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AXIS_NONE

public static final int AXIS_NONE
No axis on this coord.

See Also:
Constant Field Values

AXIS_SINGLE

public static final int AXIS_SINGLE
Use a single axis for each scale.

See Also:
Constant Field Values

AXIS_SINGLE2

public static final int AXIS_SINGLE2
Use the secondary axis. For rectular coordinate, the bottom and left are considered as primary, and top/right are secondary. For facet, the top is treated as primary and bottom is treated as secondary.

See Also:
Constant Field Values

AXIS_DOUBLE

public static final int AXIS_DOUBLE
Create two axes for each scale, with one opposite the default axis.

See Also:
Constant Field Values

AXIS_DOUBLE2

public static final int AXIS_DOUBLE2
Create two axes and display the label on the secondary axis.

See Also:
Constant Field Values

AXIS_CROSS

public static final int AXIS_CROSS
Place the axis at the zero position of the cross axis.

See Also:
Constant Field Values
Constructor Detail

AxisSpec

public AxisSpec()
Create a new AxisSpec.

Method Detail

setAxisStyle

public void setAxisStyle(int style)
Set the axis style.

Parameters:
style - one of the following, AXIS_NONE, AXIS_DOUBLE, AXIS_SINGLE.

getAxisStyle

public int getAxisStyle()
Get the axis style for this coord.


getLineColor

public Color getLineColor()
Get the axis line color.


setLineColor

public void setLineColor(Color lineColor)
Set the axis line color property.


getTextSpec

public TextSpec getTextSpec()
Get axis label text formatting attributes.


setTextSpec

public void setTextSpec(TextSpec textSpec)
Set axis label text formatting attributes.


setTextFrame

public void setTextFrame(TextFrame textFrame)
Set a text frame to map scale values to axis labels.


getTextFrame

public TextFrame getTextFrame()
Get a text frame for mapping scale values to axis label.


isAbbreviate

public boolean isAbbreviate()
Check whether label should be abbreviated.


setAbbreviate

public void setAbbreviate(boolean abbr)
Set label abbreviation. If set to true, the common prefix of date labels, or common prefix/suffix of numeric labels (e.g. %, $) is dropped when appropriate.


setAllTicks

public void setAllTicks(boolean allTick)
Set whether to include ticks whose labels are ignored by abbreviation.


isAllTicks

public boolean isAllTicks()
Check whether to include ticks whose labels are ignored by abbreviation.


isTruncate

public boolean isTruncate()
Check whether label could be truncated with "..".


setTruncate

public void setTruncate(boolean truncated)
Set whethert label could be truncated. If set to true, the label will be truncated with ".." when there is no splace to dislay it.


isLabelVisible

public boolean isLabelVisible()
Get the axis label visibility.


setLabelVisible

public void setLabelVisible(boolean labelVisible)
Set the axis label visibility.


isLineVisible

public boolean isLineVisible()
Get the axis line visibility.


setLineVisible

public void setLineVisible(boolean lineVisible)
Set the axis line visibility.


isTickVisible

public boolean isTickVisible()
Get the axis ticks visibility.


setTickVisible

public void setTickVisible(boolean tickVisible)
Set the axis ticks visibility.


getGridColor

public Color getGridColor()
Get the grid line color.


setGridColor

public void setGridColor(Color gridColor)
Set the grid line color.


getGridStyle

public int getGridStyle()
Get the grid line style.


setGridStyle

public void setGridStyle(int gridStyle)
Set the grid line style, e.g., GraphConstants.DOT_LINE.


isGridAsShape

public boolean isGridAsShape()
Check if grid lines are treated as shapes or positions.


setGridAsShape

public void setGridAsShape(boolean asShape)
Set whether grid lines are treated as shapes or positions. If grid lines are treated as shapes, they may be transformed into curves. Otherwise, they remain as straight lines with only the end points transformed.


isGridOnTop

public boolean isGridOnTop()
Check whether grid lines should be drawn on top of visual objects.


setGridOnTop

public void setGridOnTop(boolean top)
Set whether grid lines should be drawn on top of visual objects.


setInPlot

public void setInPlot(boolean inside)
Set whether space should be reserved for the max label so it doesn't need to be moved to be fit inside the plot.


isInPlot

public boolean isInPlot()
Check if space should be reserved for the max label.


setAxisSize

public void setAxisSize(double size)
Set the fixed size of the axis. It's the width and height for the vertical and horizontal axis respectively.


getAxisSize

public double getAxisSize()
Get the fixed size of the axis.

Returns:
the fixed width/height of the axis, or 0 to calculate the size from axis content.

clone

public Object clone()
Make a copy of the spec.

Overrides:
clone in class Object

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.