Package xal.extension.widgets.plot
Class FunctionGraphsPopupAdaptor
java.lang.Object
xal.extension.widgets.plot.FunctionGraphsPopupAdaptor
- All Implemented Interfaces:
ChartPopupAdaptor
FunctionGraphsPopupAdaptor implements the ChartPopupAdaptor on behalf of the
FunctionGraphsPanel class.
- Author:
- tap
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of FunctionGraphsAdaptor -
Method Summary
Modifier and TypeMethodDescriptionGet the chart component.doubleGet the maximum value of x that is visible.doubleGet the maximum value of y that is visible.doubleGet the minimum value of x that is visible.doubleGet the minimum value of y that is visible.intGet the number of major ticks on the x-axis.intGet the number of minor ticks per major step on the x-axis.intGet the number of minor ticks on the y-axis.intGet the number of minor ticks per major step on the y-axis.booleanGet the state of x-axis auto-scalingbooleanGet the visibility state of the x-axis grid.booleanGet the state of y-axis auto-scalingbooleanGet the visibility state of the y-axis grid.protected voidscaleX()Scale the x-axis once so all points fit on the chart along the x axis then keep the x-axis scale fixed.voidScale the x and y axes once so all points fit on the chart then keep the axes' scales fixed.protected voidscaleY()Scale the y-axis once so all points fit on the chart along the y axis then keep the y-axis scale fixed.voidsetMaxXLimit(double upperLimit) Set the maximum value of x that is visible.voidsetMaxYLimit(double upperLimit) Set the maximum value of y that is visible.voidsetMinXLimit(double lowerLimit) Set the minimum value of x that is visible.voidsetMinYLimit(double lowerLimit) Set the minimum value of y that is visible.voidsetXAutoScale(boolean autoScale) Set the auto-scale state of the x-axisvoidsetXGridVisible(boolean visibility) Set the visibility of the x-axis grid.voidsetXNumMajorTicks(int count) Set the number of major ticks on the x-axis.voidsetXNumMinorTicks(int count) Set the number of minor ticks on the x-axis.voidsetYAutoScale(boolean autoScale) Set the auto-scale state of the y-axisvoidsetYGridVisible(boolean visibility) Set the visibility of the y-axis grid.voidsetYNumMajorTicks(int count) Set the number of major ticks on the y-axis.voidsetYNumMinorTicks(int count) Set the number of minor ticks on the y-axis.
-
Field Details
-
chart
-
-
Constructor Details
-
FunctionGraphsPopupAdaptor
Creates a new instance of FunctionGraphsAdaptor
-
-
Method Details
-
getChartComponent
Get the chart component.- Specified by:
getChartComponentin interfaceChartPopupAdaptor- Returns:
- The chart as a component.
-
getMinXLimit
public double getMinXLimit()Get the minimum value of x that is visible.- Specified by:
getMinXLimitin interfaceChartPopupAdaptor- Returns:
- the minimum value of x that is visible
-
setMinXLimit
public void setMinXLimit(double lowerLimit) Set the minimum value of x that is visible.- Specified by:
setMinXLimitin interfaceChartPopupAdaptor- Parameters:
lowerLimit- the minimum value of x that is visible
-
getMaxXLimit
public double getMaxXLimit()Get the maximum value of x that is visible.- Specified by:
getMaxXLimitin interfaceChartPopupAdaptor- Returns:
- the maximum value of x that is visible
-
setMaxXLimit
public void setMaxXLimit(double upperLimit) Set the maximum value of x that is visible.- Specified by:
setMaxXLimitin interfaceChartPopupAdaptor- Parameters:
upperLimit- the maximum value of x that is visible
-
getMinYLimit
public double getMinYLimit()Get the minimum value of y that is visible.- Specified by:
getMinYLimitin interfaceChartPopupAdaptor- Returns:
- the minimum value of y that is visible
-
setMinYLimit
public void setMinYLimit(double lowerLimit) Set the minimum value of y that is visible.- Specified by:
setMinYLimitin interfaceChartPopupAdaptor- Parameters:
lowerLimit- the minimum value of y that is visible
-
getMaxYLimit
public double getMaxYLimit()Get the maximum value of y that is visible.- Specified by:
getMaxYLimitin interfaceChartPopupAdaptor- Returns:
- the maximum value of y that is visible
-
setMaxYLimit
public void setMaxYLimit(double upperLimit) Set the maximum value of y that is visible.- Specified by:
setMaxYLimitin interfaceChartPopupAdaptor- Parameters:
upperLimit- the maximum value of y that is visible
-
scaleXandY
public void scaleXandY()Scale the x and y axes once so all points fit on the chart then keep the axes' scales fixed.- Specified by:
scaleXandYin interfaceChartPopupAdaptor
-
scaleX
protected void scaleX()Scale the x-axis once so all points fit on the chart along the x axis then keep the x-axis scale fixed. Method intended for internal use. -
scaleY
protected void scaleY()Scale the y-axis once so all points fit on the chart along the y axis then keep the y-axis scale fixed. Method intended for internal use. -
isXAutoScale
public boolean isXAutoScale()Get the state of x-axis auto-scaling- Specified by:
isXAutoScalein interfaceChartPopupAdaptor- Returns:
- true if the x-axis has auto-scaling enabled; false if not
-
setXAutoScale
public void setXAutoScale(boolean autoScale) Set the auto-scale state of the x-axis- Specified by:
setXAutoScalein interfaceChartPopupAdaptor- Parameters:
autoScale- true to enable x-axis auto-scaling; false to disable auto-scaling
-
isYAutoScale
public boolean isYAutoScale()Get the state of y-axis auto-scaling- Specified by:
isYAutoScalein interfaceChartPopupAdaptor- Returns:
- true if the y-axis has auto-scaling enabled; false if not
-
setYAutoScale
public void setYAutoScale(boolean autoScale) Set the auto-scale state of the y-axis- Specified by:
setYAutoScalein interfaceChartPopupAdaptor- Parameters:
autoScale- true to enable y-axis auto-scaling; false to disable auto-scaling
-
getXNumMinorTicks
public int getXNumMinorTicks()Get the number of minor ticks per major step on the x-axis.- Specified by:
getXNumMinorTicksin interfaceChartPopupAdaptor- Returns:
- the number of minor ticks
-
setXNumMinorTicks
public void setXNumMinorTicks(int count) Set the number of minor ticks on the x-axis.- Specified by:
setXNumMinorTicksin interfaceChartPopupAdaptor- Parameters:
count- number of minor ticks
-
getXNumMajorTicks
public int getXNumMajorTicks()Get the number of major ticks on the x-axis.- Specified by:
getXNumMajorTicksin interfaceChartPopupAdaptor- Returns:
- the spacing per minor tick
-
setXNumMajorTicks
public void setXNumMajorTicks(int count) Set the number of major ticks on the x-axis.- Specified by:
setXNumMajorTicksin interfaceChartPopupAdaptor- Parameters:
count- number of major ticks
-
getYNumMinorTicks
public int getYNumMinorTicks()Get the number of minor ticks per major step on the y-axis.- Specified by:
getYNumMinorTicksin interfaceChartPopupAdaptor- Returns:
- the number of minor ticks
-
setYNumMinorTicks
public void setYNumMinorTicks(int count) Set the number of minor ticks on the y-axis.- Specified by:
setYNumMinorTicksin interfaceChartPopupAdaptor- Parameters:
count- the number of minor ticks
-
getYNumMajorTicks
public int getYNumMajorTicks()Get the number of minor ticks on the y-axis.- Specified by:
getYNumMajorTicksin interfaceChartPopupAdaptor- Returns:
- the number of major ticks
-
setYNumMajorTicks
public void setYNumMajorTicks(int count) Set the number of major ticks on the y-axis.- Specified by:
setYNumMajorTicksin interfaceChartPopupAdaptor- Parameters:
count- the number of major ticks
-
isXGridVisible
public boolean isXGridVisible()Get the visibility state of the x-axis grid.- Specified by:
isXGridVisiblein interfaceChartPopupAdaptor- Returns:
- true if the grid is visible
-
setXGridVisible
public void setXGridVisible(boolean visibility) Set the visibility of the x-axis grid.- Specified by:
setXGridVisiblein interfaceChartPopupAdaptor- Parameters:
visibility- true to enable the grid; false to disable the grid
-
isYGridVisible
public boolean isYGridVisible()Get the visibility state of the y-axis grid.- Specified by:
isYGridVisiblein interfaceChartPopupAdaptor- Returns:
- true if the grid is visible
-
setYGridVisible
public void setYGridVisible(boolean visibility) Set the visibility of the y-axis grid.- Specified by:
setYGridVisiblein interfaceChartPopupAdaptor- Parameters:
visibility- true to enable the grid; false to disable the grid
-