lt.monarch.chart.chart2D
Class Grid
java.lang.Object
lt.monarch.chart.engine.AbstractChartObject<GridPaintTags>
lt.monarch.chart.engine.AbstractGrid
lt.monarch.chart.chart2D.Grid
- All Implemented Interfaces:
- java.io.Serializable, ChartObject, StyleEditorEntity
public class Grid
extends AbstractGrid
Draws a grid, based on the axis mapper(s). Grid color is set as a foreground color, fill color is
set as background color using PaintStyle object. You can set rendering hints and composite using
BrushStyle object. Drawing outline can be enabled if grid is not drawn, but the background is
filled with some color.
If spacing between grid lines becomes less than 6 pixels the grid lines won't be drawn. This
feature is to prevent grid lines drawing when they are too close.
- See Also:
- Serialized Form
| Methods inherited from class lt.monarch.chart.engine.AbstractGrid |
copy, getPaintMode, getProjector, getSortPosition, getXDepth, getXMapper, getYDepth, getYMapper, setPaintMode, setXGridDepth, setYGridDepth |
| Methods inherited from class lt.monarch.chart.engine.AbstractChartObject |
activate, chart, copy, deactivate, dispose, finalize, getChart, getChartObjectBounds, getPaintStyle, getParent, getStyle, getStyle, invalidate, isVisible, layout, repaint, repaint, setChart, setVisible |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Grid
public Grid(PlaneMapper mapper,
AxisMapper xMapper,
AxisMapper yMapper)
- Constructs a new
Grid with the specified PlaneMapper, X and Y
axis mappers.
- Parameters:
mapper - the plane mapper. It is used to determine the chart display area.xMapper - the X axis mapperyMapper - the Y axis mapper
Grid
public Grid(AxisMapper xMapper,
AxisMapper yMapper)
- Constructs a new
Grid with default plane mapper PlaneMapper2D, X and Y
axis mappers.
- Parameters:
xMapper - the X axis mapperyMapper - the Y axis mapper
draw
public void draw(AbstractGraphics g)
- Description copied from interface:
ChartObject
- Renders chart object on the Graphics context.
- Specified by:
draw in interface ChartObject
- Overrides:
draw in class AbstractGrid
- Parameters:
g - graphics context
drawGrid
protected void drawGrid(AxisMapper axisMapper,
int gridDepth,
boolean isVerticalGrid,
AbstractGraphics g,
Projector projector,
GeneralPoint ptt)
- Draws the grid for the specified mapper
- Specified by:
drawGrid in class AbstractGrid
- Parameters:
axisMapper - axis mappergridDepth - grid depthisVerticalGrid - is the grid verticalg - graphics contextprojector - projectorptt - Normalized point, to avoid point creation