Overview | Package | Class | Tree | Index | Help NetCharts Pro (Applets) 7.0
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class netcharts.graphics.
NFAbstractAxis

java.lang.Object
  |
  +--netcharts.graphics.NFAbstractAxis
Subclasses:
NFAxis

public abstract class NFAbstractAxis

Field Summary
static int DATE
          Date label format
static int DECIMAL
          Java1.1 decimal label format
char decSymbol
          The decimal symbol.
static int FLOAT
          Numeric label format
int groupSize
          Size of number grouping.
char groupSymbol
          The number grouping symbol.
static int INTEGER
          Integer label format
static int SIMPLEDATE
          Java1.1 simple date label format
 
Method Summary
boolean autoGeneratedLabel(int i)
          Determine if the given label was automatically generated.
void clearTicLabels()
          Clears the tic labels.
java.awt.Color getColor()
          Get the axis color
char getDecimalSymbol()
          Returns the current decimal symbol
int getGroupSize()
          Returns the current grouping size
char getGroupSymbol()
          Returns the current grouping symbol
java.lang.String getLabel(double val)
          Returns a string label for the given value, based on the current axis format settings.
java.lang.String getLabel(double val, java.lang.String formatStr)
          Returns a string label for the given value, based on the current axis format settings.
java.lang.String getLabel(java.lang.Object val)
          Returns a string label for the given value, which can be any of the following types:
  • NFDate
  • NFTimeUnit
  • Number
java.lang.String getLabel(java.lang.Object val, java.lang.String formatStr)
          Returns a string label for the given value, which can be any of the following types:
  • NFDate
  • NFTimeUnit
  • Number
java.awt.Color getMajorTicColor()
          Get the major tic color
double getMax()
          Returns the max axis value
double getMin()
          Returns the min axis value
java.awt.Color getMinorTicColor()
          Get the minor tic color
java.awt.Point getNthPoint(int i)
          Returns the Nth tic position in screen coordinates.
boolean getShowAxis()
          Returns true if axis is showing, false if not.
boolean getShowTics()
          Returns true if tics are showing, false if not.
NFSpacing getSpacing()
          Returns the current ticSpacing for the axis, which may be null.
double getStepSize()
          Returns the step size
NFLabel getTicLabel()
          Gets the tic label attribute
java.util.Vector getTicLabels()
          Get the tic labels to be displayed.
NFLabel getTitleLabel()
          Sets label parameters to be used this axis title.
double getValue(java.lang.Object obj)
          Returns a numeric value of the object given, which may be any of the following types:
  • NFDate
  • NFTimeUnit
  • Number
java.awt.Point mapValue(double v)
          Returns a screen position along the axis corresponding to the given value, which may be within (min,max) or not.
java.awt.Point mapValue(java.lang.Object obj)
          Returns a screen position based on the current (min,max) setting and the value of the object given, which may be any of the following types:
  • NFDate
  • NFTimeUnit
  • Number
double reasonableStep(double min, double max)
          Compute a reasonable step size for the current axis relative to the amount of screen space it will be using, given the min and max values for the data set.
void setActiveLabels(java.util.Vector labels)
          Set the Axis ActiveLabels.
void setAxis(int x1, int y1, int dx, int dy)
          Specifies the screen coordinates for the axis.
void setColor(java.awt.Color c)
          Set the axis color
void setMajorTicColor(java.awt.Color c)
          Set the major tic color
void setMinorTicColor(java.awt.Color c)
          Set the minor tic color
void setNumberFormat(int groupSize, char groupSymbol, char decSymbol)
          This method can be used to set the group size, symbol and decimal symbol to be used when formatting whole numbers.
void setScale(double scale)
          Set the scale factor.
void setSpacing(NFSpacing spacing)
          Defines the tic spacing using a NFSpacing object.
void setTicDivisions(double min, double max, double ticStepSize)
          Computes tic labels and position based on the axis min, max and stepsize.
void setTicDivisions(double min, double max, int numTics)
          Computes tic labels and position based on the axis min, max and number of tics.
void setTicDivisions(java.lang.Object min, java.lang.Object max, java.lang.Object ticStepSize)
          Computes tic labels and position based on the axis min, max and stepsize, given as any of the following types:
  • NFDate
  • NFTimeUnit
  • Number
void setTicLabel(NFLabel ticLabel)
          Sets label parameters to be used for each of the axis labels.
void setTicLabels(java.util.Vector labels)
          Set the tic labels to be displayed
void setTicLabels(java.util.Vector labels, java.lang.String alParam)
          Set the tic labels to be displayed and the associated ActiveLabel parameter.
void setTicLocations(java.util.Vector v)
          Set the tic locations.
void setTitleLabel(NFLabel titleLabel)
          Sets label parameters to be used this axis title.
void setup()
          This method should be called whenever the variables affecting tic generation are modified.
void showAxis(boolean showAxis)
          Toggles the axis display.
void showAxisAndLine(boolean showAxis, boolean showAxisLine)
          Toggles the axis or axis line display.
void showAxisLine(boolean showAxisLine)
          Toggles the axis line display.
void showAxisTitle(boolean showAxisTitle)
          Toggles the axis title display.
void showTicLabels(boolean showTicLabels)
          Toggles the tic label display.
void showTics(boolean showTics)
          Toggles the tics display.
void showTicsAndLabels(boolean showTics, boolean showTicLabels)
          Toggles the tics or tic label display.
 

Field Detail

INTEGER

public static final int INTEGER
Integer label format

FLOAT

public static final int FLOAT
Numeric label format

DATE

public static final int DATE
Date label format

SIMPLEDATE

public static final int SIMPLEDATE
Java1.1 simple date label format

DECIMAL

public static final int DECIMAL
Java1.1 decimal label format

groupSize

protected int groupSize
Size of number grouping.

groupSymbol

protected char groupSymbol
The number grouping symbol.

decSymbol

protected char decSymbol
The decimal symbol.
Method Detail

setAxis

public void setAxis(int x1,
                    int y1,
                    int dx,
                    int dy)
Specifies the screen coordinates for the axis. This allows an application to move the axis around without affecting any rendering attributes.
Parameters:
x1 - The X coordinate.
y1 - The Y coordinate.
dx - The change in the X coordinate.
dy - The change in the Y coordinate.

setTicDivisions

public void setTicDivisions(double min,
                            double max,
                            int numTics)
Computes tic labels and position based on the axis min, max and number of tics.
Parameters:
min - The minimum.
max - The maximum.
numTics - The number of tics.

setTicDivisions

public void setTicDivisions(java.lang.Object min,
                            java.lang.Object max,
                            java.lang.Object ticStepSize)
Computes tic labels and position based on the axis min, max and stepsize, given as any of the following types:
Parameters:
min - The minimum.
max - The maximum.
ticStepSize - The size of the tic step.

setTicDivisions

public void setTicDivisions(double min,
                            double max,
                            double ticStepSize)
Computes tic labels and position based on the axis min, max and stepsize.
Parameters:
min - The minimum.
max - The maximum.
ticStepSize - The size of the tic step.

getValue

public double getValue(java.lang.Object obj)
Returns a numeric value of the object given, which may be any of the following types:
Parameters:
obj - The object to get the value from.
Returns:
The numeric value.

getMin

public double getMin()
Returns the min axis value
Returns:
The minimum.

getMax

public double getMax()
Returns the max axis value
Returns:
The maximum.

getStepSize

public double getStepSize()
Returns the step size
Returns:
The step size.

reasonableStep

public double reasonableStep(double min,
                             double max)
Compute a reasonable step size for the current axis relative to the amount of screen space it will be using, given the min and max values for the data set.
Parameters:
min - The minimum.
max - The maximum.
Returns:
A reasonable step size.

getLabel

public java.lang.String getLabel(double val)
Returns a string label for the given value, based on the current axis format settings.
Parameters:
val - The value to convert.
Returns:
The String version of the value.

getLabel

public java.lang.String getLabel(double val,
                       java.lang.String formatStr)
Returns a string label for the given value, based on the current axis format settings.
Parameters:
val - The value to convert.
formatStr - The format string to use.
Returns:
The String version of the value.

getLabel

public java.lang.String getLabel(java.lang.Object val)
Returns a string label for the given value, which can be any of the following types:

The label is based on the current axis format settings.

Parameters:
val - The value to convert.
Returns:
The String version of the value.

getLabel

public java.lang.String getLabel(java.lang.Object val,
                       java.lang.String formatStr)
Returns a string label for the given value, which can be any of the following types:

The label is based on the current axis format settings.

Parameters:
val - The value to convert.
formatStr - The format string to use.
Returns:
The String version of the value.

setNumberFormat

public void setNumberFormat(int groupSize,
                            char groupSymbol,
                            char decSymbol)
This method can be used to set the group size, symbol and decimal symbol to be used when formatting whole numbers. By default, no grouping is done. Common values are a groupSize of 3 and a groupSymbol of ','
Parameters:
groupSize - The grouping size.
groupSymbol - The grouping symbol.
decSymbol - The decimal symbol.

getGroupSymbol

public char getGroupSymbol()
Returns the current grouping symbol
Returns:
The symbol.

getGroupSize

public int getGroupSize()
Returns the current grouping size
Returns:
The size.

getDecimalSymbol

public char getDecimalSymbol()
Returns the current decimal symbol
Returns:
The symbol.

getNthPoint

public java.awt.Point getNthPoint(int i)
Returns the Nth tic position in screen coordinates.
Parameters:
i - The index of the point.
Returns:
The point.

mapValue

public java.awt.Point mapValue(java.lang.Object obj)
Returns a screen position based on the current (min,max) setting and the value of the object given, which may be any of the following types:
Parameters:
obj - The Object to map.
Returns:
The point.

mapValue

public abstract java.awt.Point mapValue(double v)
Returns a screen position along the axis corresponding to the given value, which may be within (min,max) or not. If the value is outside (min,max), then the screen position will be outside of the bounds of the axis.
Parameters:
v - The value to map to the axis.
Returns:
The point.

setup

public void setup()
This method should be called whenever the variables affecting tic generation are modified.

setTicLocations

public void setTicLocations(java.util.Vector v)
Set the tic locations.
Parameters:
locations - The locations to set.

getSpacing

public NFSpacing getSpacing()
Returns the current ticSpacing for the axis, which may be null.
Returns:
The spacing used for the axis.

setSpacing

public void setSpacing(NFSpacing spacing)
Defines the tic spacing using a NFSpacing object. The values generated by the NFSpacing object should be in the range (min,max).
Parameters:
spacing - The spacnig to set.

setTicLabels

public void setTicLabels(java.util.Vector labels)
Set the tic labels to be displayed
Parameters:
labels - The labels to set.

getTicLabels

public java.util.Vector getTicLabels()
Get the tic labels to be displayed.
Returns:
The tic labels.

setTicLabels

public void setTicLabels(java.util.Vector labels,
                         java.lang.String alParam)
Set the tic labels to be displayed and the associated ActiveLabel parameter.
Parameters:
labels - The labels to set.
alParam - The parameter to use in the generation of ChartEvents.

clearTicLabels

public void clearTicLabels()
Clears the tic labels.

setScale

public void setScale(double scale)
Set the scale factor.
Parameters:
scale - The scale factor.

setTicLabel

public void setTicLabel(NFLabel ticLabel)
Sets label parameters to be used for each of the axis labels.
Parameters:
ticLabel - The NFLbael to use to draw the tic labels.

setTitleLabel

public void setTitleLabel(NFLabel titleLabel)
Sets label parameters to be used this axis title.
Parameters:
titleLabel - The title label.

getTitleLabel

public NFLabel getTitleLabel()
Sets label parameters to be used this axis title.
Returns:
The title label.

getTicLabel

public NFLabel getTicLabel()
Gets the tic label attribute
Returns:
The tic label.

getShowAxis

public boolean getShowAxis()
Returns true if axis is showing, false if not.
Returns:
true if the axis is showing, false otherwise.

showAxis

public void showAxis(boolean showAxis)
Toggles the axis display.
Parameters:
showAxis - Whether to display the axis or not.

showAxisLine

public void showAxisLine(boolean showAxisLine)
Toggles the axis line display.
Parameters:
showAxisLine - Whether to display the axis line or not.

showAxisTitle

public void showAxisTitle(boolean showAxisTitle)
Toggles the axis title display.
Parameters:
showAxisTitle - Whether to display the axis title or not.

showAxisAndLine

public void showAxisAndLine(boolean showAxis,
                            boolean showAxisLine)
Toggles the axis or axis line display.
Parameters:
showAxis - Whether to display the axis or not.
showAxisLine - Whether to display the axis line or not.

getShowTics

public boolean getShowTics()
Returns true if tics are showing, false if not.
Returns:
true if the tics are showing, false otherwise.

showTics

public void showTics(boolean showTics)
Toggles the tics display.
Parameters:
showTics - Whether to show the tics or not.

showTicLabels

public void showTicLabels(boolean showTicLabels)
Toggles the tic label display.
Parameters:
showTicLabels - Whether to show the tic labels or not.

showTicsAndLabels

public void showTicsAndLabels(boolean showTics,
                              boolean showTicLabels)
Toggles the tics or tic label display.
Parameters:
showTics - Whether to show the tics or not.
showTicLabels - Whether to show the tic labels or not.

setColor

public void setColor(java.awt.Color c)
Set the axis color
Parameters:
The - axis color to set.

getColor

public java.awt.Color getColor()
Get the axis color
Returns:
The axis color.

setMajorTicColor

public void setMajorTicColor(java.awt.Color c)
Set the major tic color
Parameters:
The - major tic color to set.

getMajorTicColor

public java.awt.Color getMajorTicColor()
Get the major tic color
Returns:
The major tic color.

setMinorTicColor

public void setMinorTicColor(java.awt.Color c)
Set the minor tic color
Parameters:
The - minor tic color to set.

getMinorTicColor

public java.awt.Color getMinorTicColor()
Get the minor tic color
Returns:
The minor tic color.

autoGeneratedLabel

protected boolean autoGeneratedLabel(int i)
Determine if the given label was automatically generated.
Parameters:
i - The label index.
Returns:
true if the label was automatically generated, false otherwise.

setActiveLabels

public void setActiveLabels(java.util.Vector labels)
Set the Axis ActiveLabels.
Parameters:
labels - The new ActiveLabels.

Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


Visual Mining, Inc.
2099 Gaither Grove Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2010
All Rights Reserved.

NetCharts ProTM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Jun 29, 2010