|
|||||||||
| Home >> All >> org >> ujac >> [ chart overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.ujac.chart
Class Base2DScaleChart

java.lang.Objectorg.ujac.chart.BaseChart
org.ujac.chart.Base2DScaleChart
- All Implemented Interfaces:
- Chart
- Direct Known Subclasses:
- BarChart2D, LineChart2D, StackedBarChart2D
- public abstract class Base2DScaleChart
- extends BaseChart
Name: Base2DScaleChart
Description: Description of the class.
Log: $Log: Base2DScaleChart.java,v $
Log: Revision 1.20 2003/11/25 22:52:52 lauerc
Log: Fixed JDK 1.3 incompabilities regarding Color constants.
Log:
Log: Revision 1.19 2003/11/23 17:00:08 lauerc
Log: Cleaned up code.
Log: Fixed maximum value calculation.
Log:
Log: Revision 1.18 2003/11/14 12:45:00 lauerc
Log: Made arrowhead metrics and style customizable.
Log:
Log: Revision 1.17 2003/11/14 01:30:28 lauerc
Log: Added support for methods getMinValue + getMaxValue.
Log:
Log: Revision 1.16 2003/11/02 00:56:39 lauerc
Log: Addes support for attribute ATTR_VIEW_SCALE_ARROWS.
Log:
Log: Revision 1.15 2003/11/01 12:04:47 lauerc
Log: Added copyright notice.
Log:
Log: Revision 1.14 2003/10/31 06:27:46 lauerc
Log: Added support for attributes 'view-grid', 'grid-color', 'grid-bgcolor' and 'desacription-color'.
Log:
Log: Revision 1.13 2003/10/30 19:16:45 lauerc
Log: Fixed scaling of vertical positions in case of negative values.
Log: Drawing value range background and grid for coordinates now.
Log:
Log: Revision 1.12 2003/10/26 00:33:26 lauerc
Log: Enhanced vertical scale calculation.
Log:
Log: Revision 1.11 2003/10/25 15:22:37 lauerc
Log: Drawing values at vertical axis now.
Log:
Log: Revision 1.10 2003/10/25 14:04:37 lauerc
Log: Considering the title area properly, scaling maximum vertical position below bottom line of the title text.
Log:
Log: Revision 1.9 2003/10/16 21:12:29 lauerc
Log: Added support for area legend.
Log:
Log: Revision 1.8 2003/10/10 18:03:59 lauerc
Log: Implemented rendering of segment labels at X axis.
Log:
Log: Revision 1.7 2003/10/08 22:57:10 lauerc
Log: Slightly changed scale lines.
Log:
Log: Revision 1.6 2003/10/07 06:58:16 lauerc
Log: Added support for new attributes.
Log:
Log: Revision 1.5 2003/09/16 22:21:38 lauerc
Log: Moved attributes to ChartAttributes.
Log:
Log: Revision 1.4 2003/06/18 06:02:22 lauerc
Log: Horizontal positioning rewritten.
Log:
Log: Revision 1.3 2003/06/15 13:02:23 lauerc
Log: Fixed view port position bug at method draw scale.
Log:
Log: Revision 1.2 2003/06/10 22:19:37 lauerc
Log: More generalizations.
Log:
Log: Revision 1.1 2003/05/26 06:47:57 lauerc
Log: Initial revision.
Log:
- Version:
- $Revision: 1.20 $
| Field Summary | |
static int |
ARROWHEAD_STYLE_FILLED
The arrowhead style for filled arrows. |
static int |
ARROWHEAD_STYLE_OPEN
The arrowhead style for open arrows. |
static int |
DEFAULT_ARROWHEAD_STYLE
The default arrowhead style. |
static java.awt.Color |
DEFAULT_GRID_BACKGROUND_COLOR
The default grid background color. |
static java.awt.Color |
DEFAULT_GRID_COLOR
The default grid color. |
static float |
DEFAULT_LINE_WIDTH
The default line width. |
static float |
DEFAULT_SCALE_ARROWHEAD_LENGTH
The default scale arrowhead length. |
static java.lang.String |
DEFAULT_SCALE_ARROWHEAD_STYLE
The default scale arrowhead style. |
static float |
DEFAULT_SCALE_MARK_LENGTH
The default line width. |
protected java.awt.Rectangle |
effectiveViewport
The effective viewport (is determined whenever draw scale is called). |
protected double |
horizontalOffset
The horizontal offset for the chart. |
protected int[] |
horizontalPositions
The horizontal positions for the values. |
protected double |
horizontalScale
The horizontal scale for the chart. |
private java.awt.geom.Rectangle2D |
legendMetrics
The legend metrics, calculated at method calcViewport. |
protected double |
max
The maximum value. |
private double |
maxAreaLabelHeight
The maximum area label height, calculated at method calcViewport. |
private double |
maxSegmentLabelHeight
The maximum segment label height, calculated at method calcViewport. |
protected double |
min
The minimum value. |
protected double |
range
The value range. |
protected java.awt.Font |
scaleFont
The Font to use for the grid. |
private java.awt.geom.Rectangle2D[] |
segmentMetrics
The segment metrics, calculated at method calcViewport. |
protected int |
verticalAnchor
The vertical anchor from which to draw the chart. |
protected int |
verticalMaximum
The maximum vertical position. |
protected int |
verticalMinimum
The minimum vertical position. |
protected double |
verticalScale
The vertical scale for the chart values. |
protected int |
verticalZero
The vertical position of the zero coordinate. |
| Fields inherited from class org.ujac.chart.BaseChart |
attributes, DEFAULT_BORDER_WIDTH, DEFAULT_DESCRIPTION_COLOR, DEFAULT_DESCRIPTION_FONT, DEFAULT_DESCRIPTION_LINE_WIDTH, DEFAULT_PADDING, DEFAULT_PERCENT_FORMAT, DEFAULT_SHADOW_COLOR, DEFAULT_SHADOW_OFFSET, DEFAULT_TITLE_FONT, DEFAULT_VALUE_FORMAT, model |
| Constructor Summary | |
Base2DScaleChart()
|
|
| Method Summary | |
protected int |
calculateVerticalPosition(double value)
Calculates the vertical position for the given value. |
protected java.awt.Rectangle |
calcViewport(java.awt.geom.Rectangle2D viewport,
java.awt.Graphics2D graphics)
Calculates the viewport. |
protected void |
drawLegend(java.awt.geom.Rectangle2D viewport,
java.awt.Graphics2D graphics)
Draws the legend. |
protected void |
drawScale(java.awt.geom.Rectangle2D viewport,
java.awt.geom.Rectangle2D effectiveViewport,
java.awt.Graphics2D graphics)
Draws the scale. |
java.awt.Color |
getGridBackgroundColor()
Gets the grid background color. |
java.awt.Color |
getGridColor()
Gets the grid color. |
protected int |
getInnerPadding()
Gets the inner padding. |
float |
getLineWidth()
Gets the line width. |
float |
getScaleArrowheadLength()
Gets the scale arrowhead length. |
int |
getScaleArrowheadStyle()
Gets the scale arrowhead style. |
float |
getScaleArrowheadWidth()
Gets the scale arrowhead width. |
float |
getScaleMarkLength()
Gets the scale mark length. |
float |
getValueStepSize()
Gets the value step size. |
boolean |
isViewGrid()
Gets the 'view-grid' flag. |
boolean |
isViewLegend()
Gets the 'view-legend' flag. |
boolean |
isViewScaleArrows()
Gets the 'view-scale-arrows' flag. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
ARROWHEAD_STYLE_OPEN
public static final int ARROWHEAD_STYLE_OPEN
- The arrowhead style for open arrows.
- See Also:
- Constant Field Values
ARROWHEAD_STYLE_FILLED
public static final int ARROWHEAD_STYLE_FILLED
- The arrowhead style for filled arrows.
- See Also:
- Constant Field Values
DEFAULT_ARROWHEAD_STYLE
public static final int DEFAULT_ARROWHEAD_STYLE
- The default arrowhead style.
- See Also:
- Constant Field Values
DEFAULT_LINE_WIDTH
public static final float DEFAULT_LINE_WIDTH
- The default line width.
- See Also:
- Constant Field Values
DEFAULT_SCALE_MARK_LENGTH
public static final float DEFAULT_SCALE_MARK_LENGTH
- The default line width.
- See Also:
- Constant Field Values
DEFAULT_SCALE_ARROWHEAD_LENGTH
public static final float DEFAULT_SCALE_ARROWHEAD_LENGTH
- The default scale arrowhead length.
- See Also:
- Constant Field Values
DEFAULT_SCALE_ARROWHEAD_STYLE
public static final java.lang.String DEFAULT_SCALE_ARROWHEAD_STYLE
- The default scale arrowhead style.
- See Also:
- Constant Field Values
DEFAULT_GRID_COLOR
public static final java.awt.Color DEFAULT_GRID_COLOR
- The default grid color.
DEFAULT_GRID_BACKGROUND_COLOR
public static final java.awt.Color DEFAULT_GRID_BACKGROUND_COLOR
- The default grid background color.
scaleFont
protected java.awt.Font scaleFont
- The Font to use for the grid.
effectiveViewport
protected java.awt.Rectangle effectiveViewport
- The effective viewport (is determined whenever draw scale is called).
verticalAnchor
protected int verticalAnchor
- The vertical anchor from which to draw the chart.
verticalMinimum
protected int verticalMinimum
- The minimum vertical position.
verticalMaximum
protected int verticalMaximum
- The maximum vertical position.
verticalZero
protected int verticalZero
- The vertical position of the zero coordinate.
max
protected double max
- The maximum value.
min
protected double min
- The minimum value.
range
protected double range
- The value range.
horizontalOffset
protected double horizontalOffset
- The horizontal offset for the chart.
horizontalScale
protected double horizontalScale
- The horizontal scale for the chart.
verticalScale
protected double verticalScale
- The vertical scale for the chart values.
horizontalPositions
protected int[] horizontalPositions
- The horizontal positions for the values.
maxSegmentLabelHeight
private double maxSegmentLabelHeight
- The maximum segment label height, calculated at method calcViewport.
segmentMetrics
private java.awt.geom.Rectangle2D[] segmentMetrics
- The segment metrics, calculated at method calcViewport.
maxAreaLabelHeight
private double maxAreaLabelHeight
- The maximum area label height, calculated at method calcViewport.
legendMetrics
private java.awt.geom.Rectangle2D legendMetrics
- The legend metrics, calculated at method calcViewport.
| Constructor Detail |
Base2DScaleChart
public Base2DScaleChart()
| Method Detail |
getLineWidth
public float getLineWidth()
- Gets the line width.
getScaleMarkLength
public float getScaleMarkLength()
- Gets the scale mark length.
getValueStepSize
public float getValueStepSize()
- Gets the value step size.
isViewLegend
public boolean isViewLegend()
- Gets the 'view-legend' flag.
isViewScaleArrows
public boolean isViewScaleArrows()
- Gets the 'view-scale-arrows' flag.
getScaleArrowheadLength
public float getScaleArrowheadLength()
- Gets the scale arrowhead length.
getScaleArrowheadWidth
public float getScaleArrowheadWidth()
- Gets the scale arrowhead width.
getScaleArrowheadStyle
public int getScaleArrowheadStyle()
- Gets the scale arrowhead style.
isViewGrid
public boolean isViewGrid()
- Gets the 'view-grid' flag.
getGridColor
public java.awt.Color getGridColor()
- Gets the grid color.
getGridBackgroundColor
public java.awt.Color getGridBackgroundColor()
- Gets the grid background color.
getInnerPadding
protected int getInnerPadding()
- Gets the inner padding.
drawScale
protected void drawScale(java.awt.geom.Rectangle2D viewport, java.awt.geom.Rectangle2D effectiveViewport, java.awt.Graphics2D graphics)
- Draws the scale.
drawLegend
protected void drawLegend(java.awt.geom.Rectangle2D viewport, java.awt.Graphics2D graphics)
- Draws the legend.
calcViewport
protected java.awt.Rectangle calcViewport(java.awt.geom.Rectangle2D viewport, java.awt.Graphics2D graphics)
- Calculates the viewport.
calculateVerticalPosition
protected int calculateVerticalPosition(double value)
- Calculates the vertical position for the given value.
|
|||||||||
| Home >> All >> org >> ujac >> [ chart overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC