|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CoordSystem
Interface defining a Coordinate System object that both provides calculation functionality for determining data-space to graphics-space transformation as well as actual rendering of axes and tick marks.
| Field Summary | |
|---|---|
static int |
FIRST_YAXIS
the axis binding constant for the first y-axis |
static int |
SECOND_YAXIS
the axis binding constant for the second y-axis |
| Method Summary | |
|---|---|
void |
chartDataChanged(ChartDataModelEvent evt)
Listener to force the recomputation of all transforms on data changes |
ChartDataModelConstraints |
getChartDataModelConstraints(int axis)
Returns the used ChartDataModelConstraints. |
java.awt.geom.AffineTransform |
getDefaultTransform(int axis)
This method computes the default transform which transforms the user space coordinates of this coordinate system to the pixel space coordinates used in the Graphics object. |
Axis |
getFirstYAxis()
Returns the first y-axis. |
java.awt.Font |
getFont()
Deprecated. deprecated in version 1.4 - use getTickFont() |
java.awt.Rectangle |
getInnerBounds()
Returns the inner margin, ie the bounds minus the margins. |
int |
getMaximumXTicks()
Returns the maximum number of X ticks to draw on the X axis |
int |
getMaximumYTicks()
Returns the maximum number of Y ticks to draw on the Y axis |
boolean |
getPaintGrid()
Returns whether a grid is painted. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size needed for the renderer. |
Axis |
getSecondYAxis()
Returns the second y-axis. |
java.awt.Font |
getTickFont()
Returns the font used for the axis tick labels. |
java.awt.geom.AffineTransform |
getTransform(int axis)
Returns the currently defined AffineTransform for any y-axis. |
java.awt.Font |
getUnitFont()
Returns the font used for the axis unit labels. |
Axis |
getXAxis()
Returns the x axis. |
java.lang.String |
getXAxisUnit()
Gets the x-axis unit string. |
java.text.DecimalFormat |
getXDecimalFormat()
Returns the DecimalFormat used on the Xaxis |
java.lang.String |
getYAxisUnit()
Gets the y-axis label. |
java.text.DecimalFormat |
getYDecimalFormat()
Returns the DecimalFormat used on the Yaxis |
boolean |
isCenterLabelsBetweenTicks()
Returns true if labels are centered between ticks. |
boolean |
isPaintAxes()
Returns whether axes will be painted. |
boolean |
isPaintGrid()
if true, a grid will be painted on the chart |
boolean |
isPaintLabels()
if true, labels will be painted for each axis |
boolean |
isPaintOnlyTick()
Deprecated. deprecated as of version 1.4 |
void |
paintDefault(java.awt.Graphics2D g)
This method is called by the paint method to do the actual painting. |
void |
render(java.awt.Graphics2D g)
Overrides the method to just call paintDefault. |
void |
resetMaximumXTicks()
Resets the maximum number of ticks along the X axis to the default value |
void |
resetMaximumYTicks()
Resets the maximum number of ticks along the X axis to the default value |
void |
setBounds(java.awt.Rectangle bounds)
Computes all margins, initializes the length of the Axis and calls super.setBounds. |
void |
setCenterLabelsBetweenTicks(boolean value)
Forces the coordinate system to place the label centered between tick marks (for bar charts for example). |
void |
setFirstYAxis(Axis a)
Sets the left y-axis and computes the matrix transformation. |
void |
setFont(java.awt.Font f)
Deprecated. deprecated in version 1.4 - use setTickFont() |
void |
setMaximumXTicks(int value)
Sets the maximum number of ticks along the X axis that will be allowed. |
void |
setMaximumYTicks(int value)
Sets the maximum number of ticks along the Y axis that will be allowed. |
void |
setPaintAxes(boolean axes)
Sets whether the axes will be painted. |
void |
setPaintGrid(boolean value)
Sets whether a grid is painted. |
void |
setPaintLabels(boolean label)
Sets whether labels should be painted for the axes |
void |
setSecondYAxis(Axis a)
Sets the second y-axis and computes the matrix transformation. |
void |
setTickFont(java.awt.Font f)
Sets the font for the axis tick labels. |
void |
setTransform(java.awt.geom.AffineTransform at,
int axis)
Sets the coordinate transformation for any y-coordinate. |
void |
setUnitFont(java.awt.Font f)
Sets the font for the axis unit labels. |
void |
setXAxis(Axis a)
Sets the x-axis. |
void |
setXAxisUnit(java.lang.String xunit)
Sets the x-axis unit string. |
void |
setXDecimalFormat(java.text.DecimalFormat df)
Returns the DecimalFormat used on the Xaxis |
void |
setYAxisUnit(java.lang.String yunit)
Sets the y-axis unit string. |
void |
setYDecimalFormat(java.text.DecimalFormat df)
Returns the DecimalFormat used on the Yaxis |
| Methods inherited from interface com.approximatrix.charting.render.Renderer |
|---|
addRenderChangeListener, clearRenderChangeListeners, fireRenderChangeEvent, getBounds, removeRenderChangeListener |
| Field Detail |
|---|
static final int FIRST_YAXIS
static final int SECOND_YAXIS
| Method Detail |
|---|
void setPaintGrid(boolean value)
value - whether the grid should be paintedboolean getPaintGrid()
void setXAxis(Axis a)
a - the x-axisAxis getXAxis()
void setXAxisUnit(java.lang.String xunit)
xtext - the unit stringjava.lang.String getXAxisUnit()
void setYAxisUnit(java.lang.String yunit)
ytext - the unit stringjava.lang.String getYAxisUnit()
void setFont(java.awt.Font f)
f - the Font to be usedjava.awt.Font getFont()
void setTickFont(java.awt.Font f)
f - the Font to be usedjava.awt.Font getTickFont()
void setUnitFont(java.awt.Font f)
f - the Font to be usedjava.awt.Font getUnitFont()
void setFirstYAxis(Axis a)
a - the left y-axisAxis getFirstYAxis()
void setSecondYAxis(Axis a)
a - the right y-axisAxis getSecondYAxis()
java.awt.Rectangle getInnerBounds()
void setBounds(java.awt.Rectangle bounds)
super.setBounds. Additionally, it sets the
default AffineTransforms for every y-axis.
setBounds in interface Rendererbounds - Rectangle object defining the boundsjava.awt.Dimension getPreferredSize()
getPreferredSize in interface Renderervoid render(java.awt.Graphics2D g)
paintDefault.
render in interface Rendererg - the Graphics2D object to paint invoid paintDefault(java.awt.Graphics2D g)
g - the Graphics2D object to paint injava.text.DecimalFormat getYDecimalFormat()
java.text.DecimalFormat getXDecimalFormat()
void setYDecimalFormat(java.text.DecimalFormat df)
void setXDecimalFormat(java.text.DecimalFormat df)
boolean isPaintOnlyTick()
boolean isPaintLabels()
boolean isPaintGrid()
void setPaintLabels(boolean label)
label - true to paint labels, false otherwiseboolean isPaintAxes()
void setPaintAxes(boolean axes)
axes - true to paint axes, false otherwisevoid setMaximumXTicks(int value)
value - the maximum number of X ticks, or -1 to reset to defaultvoid setMaximumYTicks(int value)
value - the maximum number of Y ticks, or -1 to reset to defaultint getMaximumXTicks()
int getMaximumYTicks()
void resetMaximumXTicks()
void resetMaximumYTicks()
void setTransform(java.awt.geom.AffineTransform at,
int axis)
at - the AffineTransform that transforms the coordinates into pixel
spacejava.awt.geom.AffineTransform getTransform(int axis)
axis - the y-axis to be used.java.awt.geom.AffineTransform getDefaultTransform(int axis)
axis - defines which y-axis to use.ChartDataModelConstraints getChartDataModelConstraints(int axis)
void chartDataChanged(ChartDataModelEvent evt)
evt - the event that caused the data changeChartDataModelListener.chartDataChanged(com.approximatrix.charting.event.ChartDataModelEvent)void setCenterLabelsBetweenTicks(boolean value)
value - true to center, false otherwiseboolean isCenterLabelsBetweenTicks()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||