| 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 | ||
java.lang.Object
|
+--netcharts.graphics.NFAbstractAxis
|
+--netcharts.graphics.NFAxis
Tic spacing is determined by designating a number of tics, the stepsize between tics (in terms of min & max), or by assigning a NFSpacing object. If none of these parameters are defined, tics will be automatically generated based on the (min,max) values and the physical size of the axis.
Labels can be automatically generated based on the (min,max) values (default) or can be defined by a Vector of Strings. The rendering of tic labels is controlled using a NFLabel object.
| Inner Class Summary | |
| static | NFAxis.NFAxisCreator
|
| Field Summary | |
| static int | AUTO
autoskipstagger tic labels |
| static int | AUTOSKIP
autoskip tic labels |
| static int | AUTOSTAGGER
autostagger tic labels |
| int | beginMargin
The beginning margin. |
| int | endMargin
The ending margin. |
| static int | LINEAR
Linear Scale Mode |
| static int | LOG
Log Scale Mode |
| static int | NORMAL
no skip/stagger |
| static int | SKIP
skip tic labels |
| static int | SKIPSTAGGER
skip and stagger tic labels |
| static int | STAGGER
stagger tic labels |
| static int | TicBottom
Tic below axis |
| static int | TicDefault
Use default tic position |
| static int | TicLeft
Tic left of axis |
| static int | TicRight
Tic right of axis |
| static int | TicTop
Tic above axis |
| Fields inherited from class netcharts.graphics.NFAbstractAxis | |
| DATE, DECIMAL, decSymbol, FLOAT, groupSize, groupSymbol, INTEGER, SIMPLEDATE | |
| Constructor Summary | |
| NFAxis(int x1,
int y1,
int dx,
int dy)
Create a NFAxis object, using the given screen coordinates for the rendering location. | |
| Method Summary | |
| boolean | abortPreScroll(double newmin,
double newmax)
Determine if the scroll should be aborted or not. |
| void | addObserver(java.lang.Object observer)
Add a ScrollObserver. |
| static NFAxis | defaultAxis(java.lang.String name)
Create a default NFAxis object based on the name given, which can be either Top, Bottom, Left or Right. |
| static void | defineAxis(NFParam param,
java.lang.String name,
java.lang.String XY)
Define an Axis for the given parameter name and XY string. |
| void | display(java.awt.Graphics g)
Display the axis in the given graphics context. |
| java.awt.Dimension | getBounds(java.awt.Graphics g)
Returns the amount of screen space required to display the axis, including all labels and tics. |
| boolean | getChanged()
Returns true if the axis has changed and needs to be repainted |
| boolean | getDrawMinorTics()
Get the draw minor tics boolean. |
| int | getMaxCoord()
Returns the maximum screen coordinate for the current axis, which should be either purely horizontal or purely vertical. |
| int | getMinCoord()
Returns the minimum screen coordinate for the current axis, which should be either purely horizontal or purely vertical. |
| int | getMinimumThumbSize()
Get the specified minimum thumb size. |
| java.awt.Point | getNthPoint(int i)
Returns the Nth tic position in screen coordinates. |
| java.awt.Point | getNthPoint(int i,
java.awt.Point pt)
Returns the Nth tic position in screen coordinates. |
| java.awt.Rectangle | getRect(java.awt.Graphics g)
Returns the rectangle that the Axis occupies, including all labels and tics. |
| java.awt.Rectangle | getRect(java.awt.Graphics g,
java.awt.Rectangle r)
Returns the rectangle that the Axis occupies, including all labels and tics. |
| int | getScaleMode()
Get the ScaleMode, LOG or LINEAR. |
| double | getScaleModeBase()
Get the ScaleMode base for when ScaleMode is LOG. |
| double[] | getScrollLimits()
Returns the min/max values for the scroll limits, with the min value returned as the first element in a two item array. |
| int | getSkipCount()
Get the skip count |
| int | getStaggerLevels()
Get the stagger levels |
| int | getTicLength()
Returns the length of the tics used for this axis. |
| int | getTicPosition()
Returns the current tic position for this axis. |
| boolean | isSliderOn()
Returns true if scrolling is enabled. |
| static NFAxis | loadAxis(java.awt.Component comp,
NFParam param,
java.lang.String name,
NFAxis axis,
NFActiveRegion dwell)
Create an axis from the parameters. |
| static NFAxis | loadAxis(NFParam param,
java.lang.String name,
NFAxis axis,
NFActiveRegion dwell)
Create an axis from the parameters. |
| static NFAxis | loadAxisFormat(NFParam param,
java.lang.String name,
NFAxis axis)
Load the Axis format into the given axis. |
| void | loadAxisTics(java.util.Vector data)
Load the axis tics from the given Vector. |
| void | loadAxisTics(java.util.Vector data,
double scale)
Load the axis tics from the given Vector. |
| void | loadScaleSet(java.util.Vector v)
Set the scale set. |
| 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(double v,
java.awt.Point pt)
Returns a screen position along the axis corresponding to the given value, which may be within (min,max) or not. |
| boolean | mouseDown(java.awt.Event evt,
int x,
int y)
Handle the mouse down event for the axis. |
| boolean | mouseDrag(java.awt.Event evt,
int x,
int y)
Handle the mouse drag event for the axis. |
| boolean | mouseUp(java.awt.Event evt,
int x,
int y)
Handle the mouse up event for the axis. |
| void | notifyPostScroll()
Notify the observers that a scroll occured. |
| void | removeObserver(java.lang.Object observer)
Remove a ScrollObserver. |
| boolean | scroll(int direction)
This method can be used to scroll the axis a given driection, which may be any of the following:
|
| boolean | scrollTo(double newmin)
Scroll to the given min position. |
| void | setAxis(int x1,
int y1,
int dx,
int dy)
Specifies the screen coordinates for the axis. |
| void | setAxisColor(java.awt.Color c)
Set the axis color |
| void | setMinMax(double min,
double max)
Sets axis minimum and maximum values to the given values. |
| boolean | setMinMaxRect(int x,
int y,
int w,
int h)
Sets the min/max axis values based on the given rectangle defined using screen coordinates. |
| 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 | setScaleMode(int mode)
Set the ScaleMode, LOG or LINEAR. |
| void | setScaleModeBase(double scaleBase)
Set the ScaleMode base for when ScaleMode is LOG. |
| void | setScroll(boolean onoff)
Set scrolling mode on (true) or off (false) |
| void | setScrollLimits(double min,
double max)
Sets the absolute min and max values over which the axis can scroll. |
| void | setScrollLimits(java.lang.Object min,
java.lang.Object max)
Sets the absolute min and max values over which the axis can scroll, based on the given objects, which can be any of the following types:
|
| void | setTicLabel(NFLabel ticLabel)
Sets label parameters to be used for each of the axis labels. |
| void | setTicLayout(int mode,
int skipCount,
int staggerLevels)
Set the tic layout attributes |
| void | setTicLength(int ticLength)
Changes the length of the axis tics. |
| void | setTicPosition(int ticPosition)
Sets the tic position |
| java.lang.String | toString()
Return the String representation of the axis. |
| double | unMapValue(double val)
Returns the numeric value for the given pixel coordinate along the current axis. |
| boolean | zoomHome()
This method can be called to cause the axis to zoom out as far as possible. |
| boolean | zoomIn()
This method can be called to cause the axis to zoom in, if possible. |
| boolean | zoomOut()
This method can be called to cause the axis to zoom out, if possible. |
| Field Detail |
public static final int TicDefault
public static final int TicTop
public static final int TicLeft
public static final int TicRight
public static final int TicBottom
public static final int NORMAL
public static final int SKIP
public static final int STAGGER
public static final int SKIPSTAGGER
public static final int AUTOSKIP
public static final int AUTOSTAGGER
public static final int AUTO
public static final int LINEAR
public static final int LOG
protected int beginMargin
protected int endMargin
| Constructor Detail |
public NFAxis(int x1,
int y1,
int dx,
int dy)
x1
- The X coordinate.
y1
- The Y coordinate.
dx
- The change in the X coordinate.
dy
- The change in the Y coordinate.| Method Detail |
public static NFAxis defaultAxis(java.lang.String name)
name
- The location of the Axis in the Chart.
public void setAxis(int x1,
int y1,
int dx,
int dy)
x1
- The X coordinate.
y1
- The Y coordinate.
dx
- The change in the X coordinate.
dy
- The change in the Y coordinate.public void loadScaleSet(java.util.Vector v)
v
- The scaleSet to set.
public void setTicLayout(int mode,
int skipCount,
int staggerLevels)
mode
- The mode of the axis layout.
skipCount
- The skip count.
staggerLevels
- The stagger levels.public void setTicLength(int ticLength)
ticLength
- The tic length to set.public void setTicPosition(int ticPosition)
ticPosition
- The tic position to set.public int getTicPosition()
public void setTicLabel(NFLabel ticLabel)
ticLabel
- The NFLbael to use to draw the tic labels.public void setAxisColor(java.awt.Color c)
The
- axis color to set.
public void setMinMax(double min,
double max)
min
- The minimum.
max
- The maximum.
public boolean setMinMaxRect(int x,
int y,
int w,
int h)
x
- The X coordinate.
y
- The Y coordinate.
w
- The width.
h
- The height.
public void setScrollLimits(double min,
double max)
min
- The minimum.
max
- The maximum.
public void setScrollLimits(java.lang.Object min,
java.lang.Object max)
min
- The minimum.
max
- The maximum.public double[] getScrollLimits()
public void setScroll(boolean onoff)
onoff
- Whether to turn scrolling on or off.public int getMinCoord()
public int getMaxCoord()
public boolean getChanged()
public int getTicLength()
public java.awt.Dimension getBounds(java.awt.Graphics g)
g
- The Graphics to use for font metric information.public java.awt.Rectangle getRect(java.awt.Graphics g)
g
- The Graphics to use for font metric information.
public java.awt.Rectangle getRect(java.awt.Graphics g,
java.awt.Rectangle r)
g
- The Graphics to use for font metric information.
r
- The Rectangle to store the result in.public java.awt.Point getNthPoint(int i)
i
- The index of the point.
public java.awt.Point getNthPoint(int i,
java.awt.Point pt)
i
- The index of the point.
pt
- The Point to put the result in.public java.awt.Point mapValue(double v)
v
- The value to map to the axis.
public java.awt.Point mapValue(double v,
java.awt.Point pt)
The given pt is used to hold the return values, instead of generating a new object.
v
- The value to map to the axis.
pt
- The Point to put the result in.public double unMapValue(double val)
val
- The mapped value.public void display(java.awt.Graphics g)
g
- The Graphics to draw on.public boolean isSliderOn()
public boolean mouseDown(java.awt.Event evt,
int x,
int y)
evt
- The Event.
x
- The X coordinate.
y
- The Y coordinate.
public boolean mouseDrag(java.awt.Event evt,
int x,
int y)
evt
- The Event.
x
- The X coordinate.
y
- The Y coordinate.
public boolean mouseUp(java.awt.Event evt,
int x,
int y)
evt
- The Event.
x
- The X coordinate.
y
- The Y coordinate.public boolean scroll(int direction)
It returns true if the axis settings changed and the graph should be redrawn.
direction
- The direction to scroll.public boolean scrollTo(double newmin)
newmin
- The new minimum value.public boolean zoomOut()
public boolean zoomIn()
public boolean zoomHome()
public static void defineAxis(NFParam param,
java.lang.String name,
java.lang.String XY)
param
- The NFParam to define the parameters within.
name
- The parameter name.
XY
- The XY string.
public static NFAxis loadAxisFormat(NFParam param,
java.lang.String name,
NFAxis axis)
throws java.lang.Exception
param
- The NFParam to load the parameters from.
name
- The parameter name.
axis
- The axis to load the parameters into.public void loadAxisTics(java.util.Vector data)
data
- The tics.
public void loadAxisTics(java.util.Vector data,
double scale)
data
- The tics.
scale
- The scale factor.public void setScale(double scale)
scale
- The scale factor.
public static NFAxis loadAxis(NFParam param,
java.lang.String name,
NFAxis axis,
NFActiveRegion dwell)
throws java.lang.Exception
param
- The NFParam to load the parameters from.
name
- The parameter name.
axis
- The axis to store the result in.
dwell
- The ActiveRegion.
public static NFAxis loadAxis(java.awt.Component comp,
NFParam param,
java.lang.String name,
NFAxis axis,
NFActiveRegion dwell)
throws java.lang.Exception
comp
- The Component.
param
- The NFParam to load the parameters from.
name
- The parameter name.
axis
- The axis to store the result in.
dwell
- The ActiveRegion.public java.lang.String toString()
public int getScaleMode()
public void setScaleMode(int mode)
mode
- The new mode.public double getScaleModeBase()
public void setScaleModeBase(double scaleBase)
scaleBase
- The new base.public void addObserver(java.lang.Object observer)
observer
- The observer to add.public void removeObserver(java.lang.Object observer)
observer
- The observer to remove.
public boolean abortPreScroll(double newmin,
double newmax)
newmin
- The new minimum.
newmax
- The new maximum.public void notifyPostScroll()
public void setNumberFormat(int groupSize,
char groupSymbol,
char decSymbol)
groupSize
- The grouping size.
groupSymbol
- The grouping symbol.
decSymbol
- The decimal symbol.public int getSkipCount()
public int getStaggerLevels()
public boolean getDrawMinorTics()
public int getMinimumThumbSize()
| 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. | Copyright © Visual Mining, Inc. 1996 - 2010 |
Last Modified: Jun 29, 2010 |