Package xal.tools.apputils
Interface ChartPopupAdaptor
- All Known Implementing Classes:
FunctionGraphsPopupAdaptor
public interface ChartPopupAdaptor
ChartPopupAdaptor is an interface of adaptors that wrap charts so that
different kinds of charts can be manipulated via a common interface that is
appropriate for the SimpleChartPopupMenu and SimpleChartDialog.
- Author:
- tap
-
Method Summary
Modifier and TypeMethodDescriptionGet the chart component.double
Get the maximum value of x that is visible.double
Get the maximum value of y that is visible.double
Get the minimum value of x that is visible.double
Get the minimum value of y that is visible.int
Get the number of major ticks on the x-axis.int
Get the number of minor ticks per major step on the x-axis.int
Get the number of minor ticks on the y-axis.int
Get the number of minor ticks per major step on the y-axis.boolean
Get the state of x-axis auto-scalingboolean
Get the visibility state of the x-axis grid.boolean
Get the state of y-axis auto-scalingboolean
Get the visibility state of the y-axis grid.void
Scale the x and y axes once so all points fit on the chart then keep the axes' scales fixed.void
setMaxXLimit
(double upperLimit) Set the maximum value of x that is visible.void
setMaxYLimit
(double upperLimit) Set the maximum value of y that is visible.void
setMinXLimit
(double lowerLimit) Set the minimum value of x that is visible.void
setMinYLimit
(double lowerLimit) Set the minimum value of y that is visible.void
setXAutoScale
(boolean state) Set the auto-scale state of the x-axisvoid
setXGridVisible
(boolean visibility) Set the visibility of the x-axis grid.void
setXNumMajorTicks
(int count) Set the number of major ticks on the x-axis.void
setXNumMinorTicks
(int count) Set the number of minor ticks on the x-axis.void
setYAutoScale
(boolean state) Set the auto-scale state of the y-axisvoid
setYGridVisible
(boolean visibility) Set the visibility of the y-axis grid.void
setYNumMajorTicks
(int count) Set the number of major ticks on the y-axis.void
setYNumMinorTicks
(int count) Set the number of minor ticks on the y-axis.
-
Method Details
-
getChartComponent
Component getChartComponent()Get the chart component.- Returns:
- The chart as a component.
-
getMinXLimit
double getMinXLimit()Get the minimum value of x that is visible.- Returns:
- the minimum value of x that is visible
-
setMinXLimit
void setMinXLimit(double lowerLimit) Set the minimum value of x that is visible.- Parameters:
lowerLimit
- the minimum value of x that is visible
-
getMaxXLimit
double getMaxXLimit()Get the maximum value of x that is visible.- Returns:
- the maximum value of x that is visible
-
setMaxXLimit
void setMaxXLimit(double upperLimit) Set the maximum value of x that is visible.- Parameters:
upperLimit
- the maximum value of x that is visible
-
getMinYLimit
double getMinYLimit()Get the minimum value of y that is visible.- Returns:
- the minimum value of y that is visible
-
setMinYLimit
void setMinYLimit(double lowerLimit) Set the minimum value of y that is visible.- Parameters:
lowerLimit
- the minimum value of y that is visible
-
getMaxYLimit
double getMaxYLimit()Get the maximum value of y that is visible.- Returns:
- the maximum value of y that is visible
-
setMaxYLimit
void setMaxYLimit(double upperLimit) Set the maximum value of y that is visible.- Parameters:
upperLimit
- the maximum value of y that is visible
-
scaleXandY
void scaleXandY()Scale the x and y axes once so all points fit on the chart then keep the axes' scales fixed. -
isXAutoScale
boolean isXAutoScale()Get the state of x-axis auto-scaling- Returns:
- true if the x-axis has auto-scaling enabled; false if not
-
setXAutoScale
void setXAutoScale(boolean state) Set the auto-scale state of the x-axis- Parameters:
state
- true to enable x-axis auto-scaling; false to disable auto-scaling
-
isYAutoScale
boolean isYAutoScale()Get the state of y-axis auto-scaling- Returns:
- true if the y-axis has auto-scaling enabled; false if not
-
setYAutoScale
void setYAutoScale(boolean state) Set the auto-scale state of the y-axis- Parameters:
state
- true to enable y-axis auto-scaling; false to disable auto-scaling
-
getXNumMinorTicks
int getXNumMinorTicks()Get the number of minor ticks per major step on the x-axis.- Returns:
- the number of minor ticks
-
setXNumMinorTicks
void setXNumMinorTicks(int count) Set the number of minor ticks on the x-axis.- Parameters:
count
- number of minor ticks
-
getXNumMajorTicks
int getXNumMajorTicks()Get the number of major ticks on the x-axis.- Returns:
- the spacing per minor tick
-
setXNumMajorTicks
void setXNumMajorTicks(int count) Set the number of major ticks on the x-axis.- Parameters:
count
- the desired number of major ticks
-
getYNumMinorTicks
int getYNumMinorTicks()Get the number of minor ticks per major step on the y-axis.- Returns:
- the number of minor ticks
-
setYNumMinorTicks
void setYNumMinorTicks(int count) Set the number of minor ticks on the y-axis.- Parameters:
count
- the number of minor ticks
-
getYNumMajorTicks
int getYNumMajorTicks()Get the number of minor ticks on the y-axis.- Returns:
- the number of major ticks
-
setYNumMajorTicks
void setYNumMajorTicks(int count) Set the number of major ticks on the y-axis.- Parameters:
count
- the number of major ticks
-
isXGridVisible
boolean isXGridVisible()Get the visibility state of the x-axis grid.- Returns:
- true if the grid is visible
-
setXGridVisible
void setXGridVisible(boolean visibility) Set the visibility of the x-axis grid.- Parameters:
visibility
- true to enable the grid; false to disable the grid
-
isYGridVisible
boolean isYGridVisible()Get the visibility state of the y-axis grid.- Returns:
- true if the grid is visible
-
setYGridVisible
void setYGridVisible(boolean visibility) Set the visibility of the y-axis grid.- Parameters:
visibility
- true to enable the grid; false to disable the grid
-