|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.engine.AbstractChartObject<AxisPaintTags>
lt.monarch.chart.mapper.Axis
lt.monarch.chart.chart2D.axis.Axis2D
public abstract class Axis2D extends Axis
Base class for all 2D chart axis classes
| Modifier and Type | Class and Description |
|---|---|
class |
Axis2D.AxisLabelEntity
The axis label entry chart entity. |
| Modifier and Type | Field and Description |
|---|---|
protected Polygon2D |
arrowPolygon
Arrow area |
protected Polygon2D |
arrowPolygon2
Arrow2 area |
protected ArrowSettings |
arrowSettings
Axis arrow settings |
protected Alignment |
axisAlign
Specifies whether the axis is aligned. |
protected Orientation |
axisOrientation
Axis orientation |
protected DataModel |
dataModel
|
protected double |
dragFrom
Drag from point |
protected double |
dragTo
Drag to point |
protected AxisScale |
finestVisibleScale
finest visible scale |
protected boolean |
isMoreZoomAvailable
Is there more zoom available |
protected boolean |
isScrollable
Is axis scrollable, user defined |
protected boolean |
isVisible
Is axis visible, user defined |
protected boolean |
isZooming
Is now axis zooming |
protected boolean |
isZoomingEnabled
Is zooming enabled by user |
protected LabelSettings |
labelSettings
Axis arrow settings |
protected Axis |
mappedAxis
Axis to which this axis is mapped according to mapping value |
protected java.lang.Object |
mappedValue
Mapped value of axis position |
protected double |
mappedValueCoord
Mapped coordinate for the axis value, |
protected MetaDataModel |
metaModel
Meta data model |
protected java.awt.Point |
mouseClick
Point where mouse clicked |
protected java.awt.event.MouseListener |
mouseListener
Mouse event listener |
protected java.awt.event.MouseMotionListener |
mouseMotionListener
Mouse movement listener |
protected PolarPoint |
pt2D1
Temporary point |
protected PolarPoint |
pt2D2
Temporary point |
protected AxisMapperRange |
range
Axis mapper range |
protected lt.monarch.chart.chart2D.axis.Axis2D.RangeListener |
rangeListener
Axis range listener |
protected TickSettings |
tickSettings
Axis tick settings |
| Fields inherited from class lt.monarch.chart.mapper.Axis |
|---|
isInvertedMapper, mapper, textStyle |
| Fields inherited from class lt.monarch.chart.engine.AbstractChartObject |
|---|
AXIS_SORT_POSITION, BREAK_LINE_POSITION, DEFAULT_SORT_POSITION, GRID_SORT_POSITION, MARKER_SERIES_SORT_POSITION, MARKERS_SORT_POSITION, paintStyle, SERIES_SORT_POSITION, sortPosition, style |
| Modifier | Constructor and Description |
|---|---|
|
Axis2D(AxisMapper mapper,
Orientation axisOrientation)
Sole constructor. |
protected |
Axis2D(AxisMapper mapper,
Orientation axisOrientation,
MetaDataModel metaModel,
DataModel dataModel)
Sole constructor. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate()
Activates the axis. |
protected AxisLabel |
createAxisLabel(java.lang.String labelText,
Rectangle2D bounds,
java.awt.Font font,
double tickPos,
double relativeLabelPosition,
double tickHeight,
double labelOffset,
double labelRotation,
java.awt.FontMetrics fm,
int level,
int index,
boolean isKeyLabel,
Orientation orientation)
Creates an axis label. |
protected void |
deactivate()
Deactivates the axis. |
protected double |
digitizePosition(double pos)
Digitizes the position of the selection |
void |
draw(AbstractGraphics g)
Paints axis. |
protected void |
drawArrow(AbstractGraphics g)
Draws an arrow on axis |
protected abstract void |
drawAxis(AbstractGraphics g)
Draws axis line |
protected abstract void |
drawLabels(AbstractGraphics g,
LinearLabelLayouter layouter)
Draws the labels of the axis in the specified Graphics context. |
protected void |
drawSecondArrow(AbstractGraphics g)
Draws a revesed arrow |
protected abstract void |
drawTicksLabels(AbstractGraphics g,
LinearLabelLayouter layouter)
|
protected abstract void |
drawTitle(AbstractGraphics g,
LinearLabelLayouter layouter,
AxisTitle title)
Draws the title of the axis and updates label layouter that is used to layout the axis labels. |
protected void |
drawZoomRectangle(AbstractGraphics g,
double coord1,
double coord2)
Paints a zoom rectangle with the specified start and end in the specified Graphics context. |
protected abstract Rectangle2D |
getActiveArea()
Returns the Rectangle representing active area. |
Polygon2D |
getArrowPolygon()
Gets the arrowPolygon value |
ArrowSettings |
getArrowSettings()
Gets the arrowSettings object |
Alignment |
getAxisAlign()
Gets the axisAlign value. |
Alignment |
getAxisAlignment()
Gets the axis alignment value. |
Rectangle2D |
getBounds()
Gets the bounds of this axis in the form of a Rectangle object. |
Rectangle2D |
getChartObjectBounds()
Gets bounds of chart object |
AxisScale |
getFinestScale()
Returns the finest visible scale. |
LabelSettings |
getLabelSettings()
Gets the labelSettings object |
Axis |
getMappedAxis()
Gets mapped axis |
java.lang.Object |
getMappedValue()
Gets mapped value |
double |
getMappedValueCoord()
Gets mapped value coordinate for the axis |
MetaDataModel |
getMetaDataModel()
Gets the meta data model object |
java.awt.Insets |
getPreferredInsets()
Queries preferred insets for the axis. |
Projector2D |
getProjector()
Returns modified projector. |
AbstractStyle<?> |
getStyle(StyleType styleType)
Gets style object for the stylesheet attributes specified by style type. |
protected int |
getTickLength()
Gets overall tick length with offset |
TickSettings |
getTickSettings()
Gets the tickSettings object |
abstract AbstractAxisLabel[] |
getVisibleLabels()
Returns objects of visible labels. |
protected abstract Axis2D[] |
getZoomableAxes()
Gets all zoomable axes for the specified orientation |
boolean |
isScrollable()
Returns true if axis is scrollable |
boolean |
isVisible()
Get axis visibility |
boolean |
isZoomingEnabled()
Identifies whether or not this axis allows zooming through GUI using mouse gestures and particular key modifiers. |
abstract void |
prepare(AbstractGraphics g)
Calculates axis boundaries and range. |
void |
setAxisAlign(Alignment axisAlign)
Sets the axisAlign value. |
void |
setAxisPosition(Axis axis,
java.lang.Object value)
Sets axis position mapping it to some other axis value. |
void |
setBounds(Rectangle2D bounds)
Moves and resizes this axis to conform to the new bounding rectangle r. |
void |
setMappedValueCoord(double mappedValueCoord)
Sets mapped value coordinate for the axis |
void |
setScrollable(boolean scrollable)
Set axis scrollable |
void |
setVisible(boolean visible)
Set axis visibility |
void |
setZoomingEnabled(boolean enabled)
Sets whether the axis should accept zooming gestures. |
| Methods inherited from class lt.monarch.chart.mapper.Axis |
|---|
getFont, getMapper, getSortPosition, getTextStyle, getTitle, getTitles, getTitleSettings, setTitle, setTitle |
| Methods inherited from class lt.monarch.chart.engine.AbstractChartObject |
|---|
chart, copy, dispose, finalize, getChart, getPaintStyle, getParent, getStyle, invalidate, layout, repaint, repaint, setChart |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Orientation axisOrientation
protected MetaDataModel metaModel
protected DataModel dataModel
protected double mappedValueCoord
protected transient java.lang.Object mappedValue
protected PolarPoint pt2D1
protected PolarPoint pt2D2
protected Axis mappedAxis
protected AxisScale finestVisibleScale
protected Alignment axisAlign
protected boolean isZoomingEnabled
protected boolean isMoreZoomAvailable
protected java.awt.Point mouseClick
protected boolean isZooming
protected double dragFrom
protected double dragTo
protected boolean isScrollable
protected boolean isVisible
protected final lt.monarch.chart.chart2D.axis.Axis2D.RangeListener rangeListener
protected AxisMapperRange range
protected java.awt.event.MouseListener mouseListener
protected java.awt.event.MouseMotionListener mouseMotionListener
protected final TickSettings tickSettings
protected final ArrowSettings arrowSettings
protected final LabelSettings labelSettings
protected Polygon2D arrowPolygon
protected Polygon2D arrowPolygon2
| Constructor Detail |
|---|
public Axis2D(AxisMapper mapper,
Orientation axisOrientation)
mapper - the axis mapperaxisOrientation - axis orientation
protected Axis2D(AxisMapper mapper,
Orientation axisOrientation,
MetaDataModel metaModel,
DataModel dataModel)
mapper - the axis mapperaxisOrientation - axis orientationmetaModel - meta data modeldataModel - data model| Method Detail |
|---|
public AxisScale getFinestScale()
public void setBounds(Rectangle2D bounds)
bounds - The new bounding rectangle for this axispublic Rectangle2D getBounds()
public java.awt.Insets getPreferredInsets()
public abstract AbstractAxisLabel[] getVisibleLabels()
protected void drawArrow(AbstractGraphics g)
g - graphics contextprotected void drawSecondArrow(AbstractGraphics g)
g - graphics contextpublic Projector2D getProjector()
public void setMappedValueCoord(double mappedValueCoord)
mappedValueCoord - mapped value coordinatepublic double getMappedValueCoord()
public abstract void prepare(AbstractGraphics g)
g - current Graphics context.public void draw(AbstractGraphics g)
g - current graphics context.public Alignment getAxisAlignment()
protected void drawZoomRectangle(AbstractGraphics g,
double coord1,
double coord2)
g - the Graphics context in which to paint zoom rectanglecoord1 - the beginning of the zoom rectangle; should be in range [0,1]coord2 - the end of the zoom rectangle; should be in range [0,1]protected double digitizePosition(double pos)
pos - positionpublic boolean isScrollable()
public void setScrollable(boolean scrollable)
scrollable - true if axis is scrollablepublic void setVisible(boolean visible)
setVisible in class AbstractChartObject<AxisPaintTags>visible - sets axis visiblepublic boolean isVisible()
isVisible in interface ChartObjectisVisible in class AbstractChartObject<AxisPaintTags>true, if axis is visiblepublic void setZoomingEnabled(boolean enabled)
enabled - value to enable/disable zoomingpublic boolean isZoomingEnabled()
true, if zooming operations can be performed by userprotected abstract Rectangle2D getActiveArea()
protected void activate()
activate in class Axisprotected void deactivate()
deactivate in class Axis
protected abstract void drawTitle(AbstractGraphics g,
LinearLabelLayouter layouter,
AxisTitle title)
g - the Graphics context in which the axis title to paintlayouter - the label layouter used to layout axis labelstitle - the axis title to draw
protected abstract void drawLabels(AbstractGraphics g,
LinearLabelLayouter layouter)
g - the Graphics context in which the axis labels to paintlayouter - the Layouter used to layout axis labelsprotected abstract Axis2D[] getZoomableAxes()
public java.lang.Object getMappedValue()
public Axis getMappedAxis()
public void setAxisPosition(Axis axis,
java.lang.Object value)
axis - the axis to which value this axis is mappedvalue - the value on the axis to which this axis should be mappedpublic TickSettings getTickSettings()
public ArrowSettings getArrowSettings()
public LabelSettings getLabelSettings()
public MetaDataModel getMetaDataModel()
public Polygon2D getArrowPolygon()
protected abstract void drawAxis(AbstractGraphics g)
g - graphics contextprotected int getTickLength()
protected AxisLabel createAxisLabel(java.lang.String labelText,
Rectangle2D bounds,
java.awt.Font font,
double tickPos,
double relativeLabelPosition,
double tickHeight,
double labelOffset,
double labelRotation,
java.awt.FontMetrics fm,
int level,
int index,
boolean isKeyLabel,
Orientation orientation)
labelText - label textbounds - axisBoundsfont - label fonttickPos - tick positionrelativeLabelPosition - relative label positiontickHeight - tick heightlabelOffset - label offsetlabelRotation - label rotationfm - font metricslevel - label levelindex - index of the label in the axisisKeyLabel - is key labelorientation - axis orientation
protected abstract void drawTicksLabels(AbstractGraphics g,
LinearLabelLayouter layouter)
public Alignment getAxisAlign()
public void setAxisAlign(Alignment axisAlign)
axisAlign - the axisAlign valuepublic AbstractStyle<?> getStyle(StyleType styleType)
ChartObject
getStyle in interface ChartObjectgetStyle in interface StyleEditorEntitygetStyle in class AxisstyleType - style type attributespublic Rectangle2D getChartObjectBounds()
StyleEditorEntity
getChartObjectBounds in interface StyleEditorEntitygetChartObjectBounds in class AbstractChartObject<AxisPaintTags>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||