|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.plugins.AbstractChartPlugin<AbstractChart<?,?>>
lt.monarch.chart.plugins.AutoAxisAdjuster
public class AutoAxisAdjuster extends AbstractChartPlugin<AbstractChart<?,?>>
This plug-ins adjusts the axes according to the supplied mappers and data model. By default horizontalBase is equal to zero and chart is adjusted to the horizontal base. Default horizontal and vertical base is 0. Adjustments to base true.
| Modifier and Type | Field and Description |
|---|---|
protected MinMaxValues |
xAxisValues
Maximum and minimum values from data model for X values |
protected MinMaxValues |
yAxisValues
Maximum and minimum values from data model for Y values |
protected MinMaxValues |
zAxisValues
Maximum and minimum values from data model for Z values |
| Constructor and Description |
|---|
AutoAxisAdjuster(AxisMapper xAxisMapper,
AxisMapper yAxisMapper)
Constructor for 2D chart passing the two axes, which are associated to certain series. |
AutoAxisAdjuster(AxisMapper xAxisMapper,
AxisMapper yAxisMapper,
AxisMapper zAxisMapper)
Constructor for 3D chart and with an array of models. |
AutoAxisAdjuster(ChartObject[] objectList,
AxisMapper xAxisMapper,
AxisMapper yAxisMapper)
Constructor for 2D chart passing the two axes, which are associated to certain series. |
AutoAxisAdjuster(ChartObject[] objectList,
AxisMapper xAxisMapper,
AxisMapper yAxisMapper,
AxisMapper zAxisMapper)
Constructor for 3D chart and with an array of models. |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Prepares the plug-in, when it is installed. |
void |
adjustChart()
Performs chart objects modifications. |
void |
deactivate()
Cleanups the plug-in, when it is uninstalled. |
java.lang.Object |
getMargin(DataColumnType valType)
Gets margin for specified data column |
java.lang.Object |
getMaxValue(DataColumnType valType)
Gets max value for specified data column |
java.lang.Object |
getMinValue(DataColumnType valType)
Gets minimum value for specified data column |
void |
init()
Initializes the values according to the mappers and adjusts the mappers according to the models |
static boolean |
isEnabledForChart(Chart<?> chart)
Test if a chart has AuoAxisAdjuster enabled |
boolean |
isReadjustNeeded()
If needs to readjusts mappers |
void |
setMargin(DataColumnType valType,
double margin)
Sets margin value for specified data column. |
void |
setMaxValue(DataColumnType valType,
java.lang.Object maxValue)
Sets max value for specified data column |
void |
setMinValue(DataColumnType valType,
java.lang.Object minValue)
Sets minimum value for specified data column |
| Methods inherited from class lt.monarch.chart.plugins.AbstractChartPlugin |
|---|
chart, getChart, install, isActivated, paint, uninstall |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected MinMaxValues xAxisValues
protected MinMaxValues yAxisValues
protected MinMaxValues zAxisValues
| Constructor Detail |
|---|
public AutoAxisAdjuster(AxisMapper xAxisMapper,
AxisMapper yAxisMapper)
xAxisMapper - x axis mapperyAxisMapper - y axis mapper
public AutoAxisAdjuster(ChartObject[] objectList,
AxisMapper xAxisMapper,
AxisMapper yAxisMapper)
objectList - chart object array to adjust toxAxisMapper - x axis mapperyAxisMapper - y axis mapper
public AutoAxisAdjuster(AxisMapper xAxisMapper,
AxisMapper yAxisMapper,
AxisMapper zAxisMapper)
xAxisMapper - x axis mapperyAxisMapper - y axis mapperzAxisMapper - z axis mapper
public AutoAxisAdjuster(ChartObject[] objectList,
AxisMapper xAxisMapper,
AxisMapper yAxisMapper,
AxisMapper zAxisMapper)
objectList - chart object array to adjust toxAxisMapper - x axis mapperyAxisMapper - y axis mapperzAxisMapper - z axis mapper| Method Detail |
|---|
public boolean isReadjustNeeded()
public void activate()
AbstractChartPlugin
activate in class AbstractChartPlugin<AbstractChart<?,?>>public void adjustChart()
ChartPlugin
adjustChart in interface ChartPlugin<AbstractChart<?,?>>adjustChart in class AbstractChartPlugin<AbstractChart<?,?>>public void deactivate()
AbstractChartPlugin
deactivate in class AbstractChartPlugin<AbstractChart<?,?>>public void init()
public void setMargin(DataColumnType valType,
double margin)
valType - data model column typemargin - margin for specified data columnpublic java.lang.Object getMargin(DataColumnType valType)
valType - data model column type
public void setMaxValue(DataColumnType valType,
java.lang.Object maxValue)
valType - data model column typemaxValue - the max value for specified data columnpublic java.lang.Object getMaxValue(DataColumnType valType)
valType - data model column type
public void setMinValue(DataColumnType valType,
java.lang.Object minValue)
valType - data model column typeminValue - minimum value for specified data columnpublic java.lang.Object getMinValue(DataColumnType valType)
valType - data model column typepublic static boolean isEnabledForChart(Chart<?> chart)
chart - a chart
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||