kcl.waterloo.graphics
Interface GJAxisSupportInterface
-
- All Known Subinterfaces:
- GJGraphInterface
- All Known Implementing Classes:
- GJAbstractGraph, GJAbstractGraph0, GJAbstractGraph1, GJGraph
public interface GJAxisSupportInterfaceDefines axis support methods for graphs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description java.lang.Stringformat(double v)Returns a string for axis labels formatted by an internal formatterjava.lang.StringformatXAxisLabel(double v)Returns a string for x-axis labels formatted by an internal formatterjava.lang.StringformatYAxisLabel(double v)Returns a string for y-axis labels formatted by an internal formatterjava.awt.geom.Rectangle2DgetAxesBounds()Returns the bounds of the axes (xLeft, yBottom, width, height)java.awt.ColorgetAxisColor()Returns the axis painting colorjava.awt.event.MouseAdaptergetAxisMouseHandler()Returns the mouse handler for this axisfloatgetAxisStrokeWeight()Returns the stroke thickness for axesGJAxisPanelgetBottomAxisPanel()Returns the panel for drawing the bottom axis.java.util.ArrayList<Category>getCategoricalLabels(GJAxisPanel.Orientation o)Returns the categorical data on the specified axisGJAxisPanelgetLeftAxisPanel()Returns the panel for drawing the left axis.java.awt.ColorgetMajorGridColor()Returns the major grid painting colorfloatgetMajorGridStrokeWeight()Returns the stroke thickness for major gridsdoublegetMajorXHint()Returns the value for the hintdoublegetMajorYHint()Returns the value for the hintintgetMinorCountXHint()Returns a hint for the number of minor grids to paint per major grid division for the x-axis.intgetMinorCountYHint()Returns a hint for the number of minor grids to paint per major grid division for the y-axis.java.awt.ColorgetMinorGridColor()Returns the minor grid painting colorfloatgetMinorGridStrokeWeight()Returns the stroke thickness for minor gridsjava.awt.geom.Point2DgetOrigin()Returns the origin through which internal axes will be painted.doublegetOriginX()Returns the origin for the y-dimensiondoublegetOriginY()Returns the origin for the x-dimensionGJAxisPanelgetRightAxisPanel()Returns the panel for drawing the right axis.GJAxisPanelgetTopAxisPanel()Returns the panel for drawing the top axis.doublegetXAxisLabelRotation(double v)Returns the rotation for x-axis labels at the location specified by vjava.lang.StringgetXLabel()Returns the string for the x-axis labeldoublegetXLeft()Returns the value displayed at the left of the x-axisdoublegetXMax()Returns the maximum value for the x-axis displaydoublegetXMin()Returns the minimum value for the x-axis displaydoublegetXRight()Returns the value displayed at the right of the x-axisdoublegetYAxisLabelRotation(double v)Returns the rotation for y-axis labels at the location specified by vdoublegetYBottom()Returns the value displayed at the bottom of the y-axisjava.lang.StringgetYLabel()Returns the string for the y-axis labeldoublegetYMax()Returns the maximum value for the x-axis displaydoublegetYMin()Returns the minimum value for the y-axis displaydoublegetYTop()Returns the value displayed at the top of the y-axisbooleanisBottomAxisLabelled()Returns true if the bottom axis is labelledbooleanisBottomAxisPainted()booleanisCategorical(GJAxisPanel.Orientation o)Returns true if the data on the specified axis contains categorical values.booleanisInnerAxisLabelled()Returns the flag for painting the inner axis labelsbooleanisInnerAxisPainted()Returns true if the inner axis is paintedbooleanisLeftAxisLabelled()Returns true if the left axis is labelledbooleanisLeftAxisPainted()booleanisMajorGridPainted()Returns true if the major grid is paintedbooleanisMinorGridPainted()Returns true if the minor grid is paintedbooleanisRightAxisLabelled()Returns true if the right axis is labelledbooleanisRightAxisPainted()booleanisTopAxisLabelled()Returns true if the top axis is labelledbooleanisTopAxisPainted()booleanisXReversed()Returns true if the x-axis and data are painted in reversebooleanisYReversed()Returns true if the y-axis and data are painted in reversevoidsetAxesBounds(java.awt.geom.Rectangle2D r)Sets the bounds of the axes (xLeft, yBottom, width, height)voidsetAxisColor(java.awt.Color axisColor)Sets the color for painting the axisvoidsetAxisStrokeWeight(float axisStroke)Sets the width of lines for the axesvoidsetBottomAxisLabelled(boolean flag)Sets the bottom axis is labelling flagvoidsetBottomAxisPainted(boolean flag)Sets the flag for painting the bottom axisvoidsetInnerAxisLabelled(boolean flag)Sets the flag for painting the inner axis labelsvoidsetInnerAxisPainted(boolean flag)Sets the flag for painting the inner axisvoidsetLeftAxisLabelled(boolean flag)Sets the left axis is labelling flagvoidsetLeftAxisPainted(boolean flag)Sets the flag for painting the left axisvoidsetMajorGridColor(java.awt.Color majorGridColor)Sets the color for painting the major gridvoidsetMajorGridPainted(boolean flag)Sets the flag for painting the major gridvoidsetMajorGridStrokeWeight(float majorGridStrokeWeight)Sets the stroke thickness for major gridsvoidsetMajorXHint()Automatically sets the hintvoidsetMajorXHint(double hint)Sets the hint to the specified valuevoidsetMajorYHint()Automatically sets the hintvoidsetMajorYHint(double hint)Sets the hint to the specified valuevoidsetMinorCountXHint(int minorCountX)Provides a hint to how many minor grid lines should be painted.voidsetMinorCountYHint(int minorCountY)Provides a hint to how many minor grid lines should be painted.voidsetMinorGridColor(java.awt.Color minorGridColor)Sets the color for painting the minor gridvoidsetMinorGridPainted(boolean flag)Sets the flag for painting the minor gridvoidsetMinorGridStrokeWeight(float gridStroke)Sets the stroke thickness for minor gridsvoidsetOrigin(java.awt.geom.Point2D p)Sets the origin - through which internal axes will be painted.voidsetOriginX(double v)Sets the origin for the x-dimensionvoidsetOriginY(double v)Sets the origin for the y-dimensionvoidsetReverseX(boolean flag)Sets the axis reversal flag for the x-axis.voidsetReverseY(boolean flag)Sets the axis reversal flag for the x-axis.voidsetRightAxisLabelled(boolean flag)Sets the right axis is labelling flagvoidsetRightAxisPainted(boolean flag)Sets the flag for painting the right axisvoidsetTopAxisLabelled(boolean flag)Sets the top axis is labelling flagvoidsetTopAxisPainted(boolean flag)Sets the flag for painting the top axisvoidsetXLabel(java.lang.String s)Sets the string for the x-axis labelvoidsetXLeft(double val)Sets the value displayed at the left of the x-axisvoidsetXRight(double val)Sets the value displayed at the right of the x-axisvoidsetYBottom(double val)Sets the value displayed at the bottom of the y-axisvoidsetYLabel(java.lang.String s)Sets the string for the x-axis labelvoidsetYTop(double val)Sets the value displayed at the top of the y-axis
-
-
-
Method Detail
-
isTopAxisPainted
boolean isTopAxisPainted()
- Returns:
- true if the top axis is painted
-
isLeftAxisPainted
boolean isLeftAxisPainted()
- Returns:
- true if the left axis is painted
-
isRightAxisPainted
boolean isRightAxisPainted()
- Returns:
- true if the right axis is painted
-
isBottomAxisPainted
boolean isBottomAxisPainted()
- Returns:
- true if the bottom axis is painted
-
setTopAxisPainted
void setTopAxisPainted(boolean flag)
Sets the flag for painting the top axis- Parameters:
flag- the setting to use
-
setLeftAxisPainted
void setLeftAxisPainted(boolean flag)
Sets the flag for painting the left axis- Parameters:
flag- the setting to use
-
setRightAxisPainted
void setRightAxisPainted(boolean flag)
Sets the flag for painting the right axis- Parameters:
flag- the setting to use
-
setBottomAxisPainted
void setBottomAxisPainted(boolean flag)
Sets the flag for painting the bottom axis- Parameters:
flag- the setting to use
-
getTopAxisPanel
GJAxisPanel getTopAxisPanel()
Returns the panel for drawing the top axis.- Returns:
- a GJAxisPanel instance
-
getLeftAxisPanel
GJAxisPanel getLeftAxisPanel()
Returns the panel for drawing the left axis.- Returns:
- a GJAxisPanel instance
-
getRightAxisPanel
GJAxisPanel getRightAxisPanel()
Returns the panel for drawing the right axis.- Returns:
- a GJAxisPanel instance
-
getBottomAxisPanel
GJAxisPanel getBottomAxisPanel()
Returns the panel for drawing the bottom axis.- Returns:
- a GJAxisPanel instance
-
getXLabel
java.lang.String getXLabel()
Returns the string for the x-axis label- Returns:
- the String
-
getYLabel
java.lang.String getYLabel()
Returns the string for the y-axis label- Returns:
- the String
-
setXLabel
void setXLabel(java.lang.String s)
Sets the string for the x-axis label- Parameters:
s- the String
-
setYLabel
void setYLabel(java.lang.String s)
Sets the string for the x-axis label- Parameters:
s- the String
-
isXReversed
boolean isXReversed()
Returns true if the x-axis and data are painted in reverse- Returns:
- the reversal flag
-
setReverseX
void setReverseX(boolean flag)
Sets the axis reversal flag for the x-axis.- Parameters:
flag-
-
isYReversed
boolean isYReversed()
Returns true if the y-axis and data are painted in reverse- Returns:
- the reversal flag
-
setReverseY
void setReverseY(boolean flag)
Sets the axis reversal flag for the x-axis.- Parameters:
flag-
-
getXMin
double getXMin()
Returns the minimum value for the x-axis display- Returns:
- the value
-
getXMax
double getXMax()
Returns the maximum value for the x-axis display- Returns:
- the value
-
getYMin
double getYMin()
Returns the minimum value for the y-axis display- Returns:
- the value
-
getYMax
double getYMax()
Returns the maximum value for the x-axis display- Returns:
- the value
-
getXLeft
double getXLeft()
Returns the value displayed at the left of the x-axis- Returns:
- the value
-
setXLeft
void setXLeft(double val)
Sets the value displayed at the left of the x-axis- Parameters:
val- the value
-
getXRight
double getXRight()
Returns the value displayed at the right of the x-axis- Returns:
- the value
-
setXRight
void setXRight(double val)
Sets the value displayed at the right of the x-axis- Parameters:
val- the value
-
getYTop
double getYTop()
Returns the value displayed at the top of the y-axis- Returns:
- the value
-
setYTop
void setYTop(double val)
Sets the value displayed at the top of the y-axis- Parameters:
val- the value
-
getYBottom
double getYBottom()
Returns the value displayed at the bottom of the y-axis- Returns:
- the value
-
setYBottom
void setYBottom(double val)
Sets the value displayed at the bottom of the y-axis- Parameters:
val- the value
-
getOrigin
java.awt.geom.Point2D getOrigin()
Returns the origin through which internal axes will be painted.- Returns:
- a Point2D object
-
setOrigin
void setOrigin(java.awt.geom.Point2D p)
Sets the origin - through which internal axes will be painted.- Parameters:
p- a Point2D object
-
getOriginY
double getOriginY()
Returns the origin for the x-dimension- Returns:
- a double
-
getOriginX
double getOriginX()
Returns the origin for the y-dimension- Returns:
- a double
-
setOriginX
void setOriginX(double v)
Sets the origin for the x-dimension- Parameters:
v- a double
-
setOriginY
void setOriginY(double v)
Sets the origin for the y-dimension- Parameters:
v- a double
-
getMinorCountXHint
int getMinorCountXHint()
Returns a hint for the number of minor grids to paint per major grid division for the x-axis.- Returns:
- an int
-
getMinorCountYHint
int getMinorCountYHint()
Returns a hint for the number of minor grids to paint per major grid division for the y-axis.- Returns:
- an int
-
isLeftAxisLabelled
boolean isLeftAxisLabelled()
Returns true if the left axis is labelled- Returns:
- the label flag
-
isRightAxisLabelled
boolean isRightAxisLabelled()
Returns true if the right axis is labelled- Returns:
- the label flag
-
isTopAxisLabelled
boolean isTopAxisLabelled()
Returns true if the top axis is labelled- Returns:
- the label flag
-
isBottomAxisLabelled
boolean isBottomAxisLabelled()
Returns true if the bottom axis is labelled- Returns:
- the label flag
-
setLeftAxisLabelled
void setLeftAxisLabelled(boolean flag)
Sets the left axis is labelling flag- Parameters:
flag- the label flag
-
setRightAxisLabelled
void setRightAxisLabelled(boolean flag)
Sets the right axis is labelling flag- Parameters:
flag- the label flag
-
setTopAxisLabelled
void setTopAxisLabelled(boolean flag)
Sets the top axis is labelling flag- Parameters:
flag- the label flag
-
setBottomAxisLabelled
void setBottomAxisLabelled(boolean flag)
Sets the bottom axis is labelling flag- Parameters:
flag- the label flag
-
isMajorGridPainted
boolean isMajorGridPainted()
Returns true if the major grid is painted- Returns:
- the flag
-
setMajorGridPainted
void setMajorGridPainted(boolean flag)
Sets the flag for painting the major grid- Parameters:
flag- the boolean value
-
isMinorGridPainted
boolean isMinorGridPainted()
Returns true if the minor grid is painted- Returns:
- the flag
-
setMinorGridPainted
void setMinorGridPainted(boolean flag)
Sets the flag for painting the minor grid- Parameters:
flag- the boolean value
-
isInnerAxisPainted
boolean isInnerAxisPainted()
Returns true if the inner axis is painted- Returns:
- the flag
-
setInnerAxisPainted
void setInnerAxisPainted(boolean flag)
Sets the flag for painting the inner axis- Parameters:
flag- the boolean value
-
isInnerAxisLabelled
boolean isInnerAxisLabelled()
Returns the flag for painting the inner axis labels- Returns:
- the flag
-
setInnerAxisLabelled
void setInnerAxisLabelled(boolean flag)
Sets the flag for painting the inner axis labels- Parameters:
flag- the boolean value
-
getAxisColor
java.awt.Color getAxisColor()
Returns the axis painting color- Returns:
- the color
-
setAxisColor
void setAxisColor(java.awt.Color axisColor)
Sets the color for painting the axis- Parameters:
axisColor- the color
-
getMajorGridColor
java.awt.Color getMajorGridColor()
Returns the major grid painting color- Returns:
- the color
-
setMajorGridColor
void setMajorGridColor(java.awt.Color majorGridColor)
Sets the color for painting the major grid- Parameters:
majorGridColor- the color
-
getMinorGridColor
java.awt.Color getMinorGridColor()
Returns the minor grid painting color- Returns:
- the color
-
setMinorGridColor
void setMinorGridColor(java.awt.Color minorGridColor)
Sets the color for painting the minor grid- Parameters:
minorGridColor- the color
-
format
java.lang.String format(double v)
Returns a string for axis labels formatted by an internal formatter- Parameters:
v- the value to format- Returns:
- the String
-
formatXAxisLabel
java.lang.String formatXAxisLabel(double v)
Returns a string for x-axis labels formatted by an internal formatter- Parameters:
v- the value to format- Returns:
- the String
-
formatYAxisLabel
java.lang.String formatYAxisLabel(double v)
Returns a string for y-axis labels formatted by an internal formatter- Parameters:
v- the value to format- Returns:
- the String
-
getXAxisLabelRotation
double getXAxisLabelRotation(double v)
Returns the rotation for x-axis labels at the location specified by v- Parameters:
v- the location- Returns:
- the rotation in radians
-
getYAxisLabelRotation
double getYAxisLabelRotation(double v)
Returns the rotation for y-axis labels at the location specified by v- Parameters:
v- the location- Returns:
- the rotation in radians
-
isCategorical
boolean isCategorical(GJAxisPanel.Orientation o)
Returns true if the data on the specified axis contains categorical values.- Parameters:
o- a GJAxisPanel.Orientation value- Returns:
- true if categorical data are present
-
getCategoricalLabels
java.util.ArrayList<Category> getCategoricalLabels(GJAxisPanel.Orientation o)
Returns the categorical data on the specified axis- Parameters:
o- a GJAxisPanel.Orientation value- Returns:
- an ArrayList
-
getAxisMouseHandler
java.awt.event.MouseAdapter getAxisMouseHandler()
Returns the mouse handler for this axis- Returns:
- a MouseAdapter
-
getAxesBounds
java.awt.geom.Rectangle2D getAxesBounds()
Returns the bounds of the axes (xLeft, yBottom, width, height)- Returns:
- a Rectangle2D
-
setAxesBounds
void setAxesBounds(java.awt.geom.Rectangle2D r)
Sets the bounds of the axes (xLeft, yBottom, width, height)- Parameters:
r- a Rectangle2D
-
setMinorCountXHint
void setMinorCountXHint(int minorCountX)
Provides a hint to how many minor grid lines should be painted.- Parameters:
minorCountX- number for the x-axis
-
setMinorCountYHint
void setMinorCountYHint(int minorCountY)
Provides a hint to how many minor grid lines should be painted.- Parameters:
minorCountY- number for the y-axis
-
setMajorXHint
void setMajorXHint()
Automatically sets the hint
-
getMajorXHint
double getMajorXHint()
Returns the value for the hint- Returns:
- the value
-
setMajorXHint
void setMajorXHint(double hint)
Sets the hint to the specified value- Parameters:
hint- the value
-
setMajorYHint
void setMajorYHint()
Automatically sets the hint
-
getMajorYHint
double getMajorYHint()
Returns the value for the hint- Returns:
- the value
-
setMajorYHint
void setMajorYHint(double hint)
Sets the hint to the specified value- Parameters:
hint- the value
-
getAxisStrokeWeight
float getAxisStrokeWeight()
Returns the stroke thickness for axes- Returns:
- thickness in pixels
-
setAxisStrokeWeight
void setAxisStrokeWeight(float axisStroke)
Sets the width of lines for the axes- Parameters:
axisStroke- the stroke thickness in pixels
-
getMinorGridStrokeWeight
float getMinorGridStrokeWeight()
Returns the stroke thickness for minor grids- Returns:
- thickness in pixels
-
setMinorGridStrokeWeight
void setMinorGridStrokeWeight(float gridStroke)
Sets the stroke thickness for minor grids- Parameters:
gridStroke- the thickness in pixels
-
getMajorGridStrokeWeight
float getMajorGridStrokeWeight()
Returns the stroke thickness for major grids- Returns:
- thickness in pixels
-
setMajorGridStrokeWeight
void setMajorGridStrokeWeight(float majorGridStrokeWeight)
Sets the stroke thickness for major grids- Parameters:
majorGridStrokeWeight- the thickness in pixels
-
-
DMelt 3.0 © DataMelt by jWork.ORG