public class FunctionGraphsPopupAdaptor extends java.lang.Object implements ChartPopupAdaptor
Modifier and Type | Field and Description |
---|---|
protected FunctionGraphsJPanel |
chart |
Constructor and Description |
---|
FunctionGraphsPopupAdaptor(FunctionGraphsJPanel newChart)
Creates a new instance of FunctionGraphsAdaptor
|
Modifier and Type | Method and Description |
---|---|
java.awt.Component |
getChartComponent()
Get the chart component.
|
double |
getMaxXLimit()
Get the maximum value of x that is visible.
|
double |
getMaxYLimit()
Get the maximum value of y that is visible.
|
double |
getMinXLimit()
Get the minimum value of x that is visible.
|
double |
getMinYLimit()
Get the minimum value of y that is visible.
|
int |
getXNumMajorTicks()
Get the number of major ticks on the x-axis.
|
int |
getXNumMinorTicks()
Get the number of minor ticks per major step on the x-axis.
|
int |
getYNumMajorTicks()
Get the number of minor ticks on the y-axis.
|
int |
getYNumMinorTicks()
Get the number of minor ticks per major step on the y-axis.
|
boolean |
isXAutoScale()
Get the state of x-axis auto-scaling
|
boolean |
isXGridVisible()
Get the visibility state of the x-axis grid.
|
boolean |
isYAutoScale()
Get the state of y-axis auto-scaling
|
boolean |
isYGridVisible()
Get the visibility state of the y-axis grid.
|
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.
|
void |
scaleXandY()
Scale the x and y axes once so all points fit on the chart then keep
the axes' scales fixed.
|
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.
|
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 autoScale)
Set the auto-scale state of the x-axis
|
void |
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 autoScale)
Set the auto-scale state of the y-axis
|
void |
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.
|
protected FunctionGraphsJPanel chart
public FunctionGraphsPopupAdaptor(FunctionGraphsJPanel newChart)
public java.awt.Component getChartComponent()
getChartComponent
in interface ChartPopupAdaptor
public double getMinXLimit()
getMinXLimit
in interface ChartPopupAdaptor
public void setMinXLimit(double lowerLimit)
setMinXLimit
in interface ChartPopupAdaptor
lowerLimit
- the minimum value of x that is visiblepublic double getMaxXLimit()
getMaxXLimit
in interface ChartPopupAdaptor
public void setMaxXLimit(double upperLimit)
setMaxXLimit
in interface ChartPopupAdaptor
upperLimit
- the maximum value of x that is visiblepublic double getMinYLimit()
getMinYLimit
in interface ChartPopupAdaptor
public void setMinYLimit(double lowerLimit)
setMinYLimit
in interface ChartPopupAdaptor
lowerLimit
- the minimum value of y that is visiblepublic double getMaxYLimit()
getMaxYLimit
in interface ChartPopupAdaptor
public void setMaxYLimit(double upperLimit)
setMaxYLimit
in interface ChartPopupAdaptor
upperLimit
- the maximum value of y that is visiblepublic void scaleXandY()
scaleXandY
in interface ChartPopupAdaptor
protected void scaleX()
protected void scaleY()
public boolean isXAutoScale()
isXAutoScale
in interface ChartPopupAdaptor
public void setXAutoScale(boolean autoScale)
setXAutoScale
in interface ChartPopupAdaptor
autoScale
- true to enable x-axis auto-scaling; false to disable auto-scalingpublic boolean isYAutoScale()
isYAutoScale
in interface ChartPopupAdaptor
public void setYAutoScale(boolean autoScale)
setYAutoScale
in interface ChartPopupAdaptor
autoScale
- true to enable y-axis auto-scaling; false to disable auto-scalingpublic int getXNumMinorTicks()
getXNumMinorTicks
in interface ChartPopupAdaptor
public void setXNumMinorTicks(int count)
setXNumMinorTicks
in interface ChartPopupAdaptor
count
- number of minor tickspublic int getXNumMajorTicks()
getXNumMajorTicks
in interface ChartPopupAdaptor
public void setXNumMajorTicks(int count)
setXNumMajorTicks
in interface ChartPopupAdaptor
count
- number of major tickspublic int getYNumMinorTicks()
getYNumMinorTicks
in interface ChartPopupAdaptor
public void setYNumMinorTicks(int count)
setYNumMinorTicks
in interface ChartPopupAdaptor
count
- the number of minor tickspublic int getYNumMajorTicks()
getYNumMajorTicks
in interface ChartPopupAdaptor
public void setYNumMajorTicks(int count)
setYNumMajorTicks
in interface ChartPopupAdaptor
count
- the number of major tickspublic boolean isXGridVisible()
isXGridVisible
in interface ChartPopupAdaptor
public void setXGridVisible(boolean visibility)
setXGridVisible
in interface ChartPopupAdaptor
visibility
- true to enable the grid; false to disable the gridpublic boolean isYGridVisible()
isYGridVisible
in interface ChartPopupAdaptor
public void setYGridVisible(boolean visibility)
setYGridVisible
in interface ChartPopupAdaptor
visibility
- true to enable the grid; false to disable the grid