|
|||||||||
| 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
lt.monarch.chart.chart2D.axis.Axis2DY
public class Axis2DY extends Axis2D
Graphical representation of the Y coordinate axis of the 2D chart. Scrollable graphical representation of the Y coordinate axis of the 2D chart. Default implementation handles mouse dragging. A simple mouse click and drag is translated into an axis scroll. Ctrl + mouse drag select position of the axis for zooming. While Ctrl + mouse click unzooms the axis. These are the default event modifiers. The actual modifiers are specified in the stylesheet and "scrollModifiers" keys.
| Modifier and Type | Class and Description |
|---|
| Nested classes/interfaces inherited from class lt.monarch.chart.chart2D.axis.Axis2D |
|---|
Axis2D.AxisLabelEntity |
| Modifier and Type | Field and Description |
|---|---|
protected double |
labelWidth
Preferred width for the labels |
protected double |
maxLabelWidth
Width of the longest rotated label projection. |
protected double |
preferredWidth
Preferred width for the axis |
protected double |
totalLabelWidth
Width of the total label width. |
protected AbstractAxisLabel[] |
visibleLabels
Storage of label objects that are currently painted on the screen. |
| Fields inherited from class lt.monarch.chart.chart2D.axis.Axis2D |
|---|
arrowPolygon, arrowPolygon2, arrowSettings, axisAlign, axisOrientation, dataModel, dragFrom, dragTo, finestVisibleScale, isMoreZoomAvailable, isScrollable, isVisible, isZooming, isZoomingEnabled, labelSettings, mappedAxis, mappedValue, mappedValueCoord, metaModel, mouseClick, mouseListener, mouseMotionListener, pt2D1, pt2D2, range, rangeListener, tickSettings |
| 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 |
| Constructor and Description |
|---|
Axis2DY(AxisMapper mapper)
Constructs a new graphical representation of the Y coordinate axis of the 2D chart with the specified axis mapper. |
Axis2DY(AxisMapper mapper,
MetaDataModel metaModel,
DataModel dataModel)
Constructs a new graphical representation of the Y coordinate axis of the 2D chart with the specified axis mapper. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
drawAxis(AbstractGraphics g)
Draws axis line |
void |
drawLabels(AbstractGraphics g,
LinearLabelLayouter layouter)
Draws the labels of the axis in the specified Graphics context. |
protected void |
drawTicksLabels(AbstractGraphics g,
LinearLabelLayouter layouter)
Prepares labels for drawing |
protected void |
drawTitle(AbstractGraphics g,
LinearLabelLayouter layouter,
AxisTitle axisTitle)
Draws the title of the axis and updates label layouter that is used to layout the axis labels. |
protected Rectangle2D |
getActiveArea()
Get area where is chart with y axis. |
java.awt.Insets |
getPreferredInsets()
Queries preferred insets for the axis. |
Axis2DY |
getStackAxis2DY()
Returns the base Y axis. |
int |
getTitleWidth(AbstractGraphics g)
Returns horizontal amount of space needed to draw axis title. |
AbstractAxisLabel[] |
getVisibleLabels()
Returns objects of visible labels. |
double |
getWidth()
Returns the width of area required to draw the axis. |
protected Axis2D[] |
getZoomableAxes()
Gets all zoomable axes for the specified orientation |
void |
prepare(AbstractGraphics g)
Prepares this axis for rendering. |
void |
setStackAxis2DY(Axis2DY baseAxis)
Stacks this Y axis on top of the base Y axis. |
static void |
setStackedYAxisMargin(Chart<Projector2D> chart,
float margin)
Deprecated. use lt.monarch.chart.chart2D.Chart2D.setStackedYAxisMargin(float) |
void |
setTitle(int titleNr,
AxisTitle title)
|
| Methods inherited from class lt.monarch.chart.chart2D.axis.Axis2D |
|---|
activate, createAxisLabel, deactivate, digitizePosition, draw, drawArrow, drawSecondArrow, drawZoomRectangle, getArrowPolygon, getArrowSettings, getAxisAlign, getAxisAlignment, getBounds, getChartObjectBounds, getFinestScale, getLabelSettings, getMappedAxis, getMappedValue, getMappedValueCoord, getMetaDataModel, getProjector, getStyle, getTickLength, getTickSettings, isScrollable, isVisible, isZoomingEnabled, setAxisAlign, setAxisPosition, setBounds, setMappedValueCoord, setScrollable, setVisible, setZoomingEnabled |
| Methods inherited from class lt.monarch.chart.mapper.Axis |
|---|
getFont, getMapper, getSortPosition, getTextStyle, getTitle, getTitles, getTitleSettings, 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 double preferredWidth
protected double labelWidth
protected AbstractAxisLabel[] visibleLabels
protected double maxLabelWidth
protected double totalLabelWidth
| Constructor Detail |
|---|
public Axis2DY(AxisMapper mapper)
mapper - the axis mapper
public Axis2DY(AxisMapper mapper,
MetaDataModel metaModel,
DataModel dataModel)
mapper - the axis mappermetaModel - meta data modeldataModel - data model| Method Detail |
|---|
public void prepare(AbstractGraphics g)
prepare in class Axis2Dg - the Graphics context in which the axis will be paintedpublic double getWidth()
public java.awt.Insets getPreferredInsets()
Axis2D
getPreferredInsets in class Axis2D
protected void drawTicksLabels(AbstractGraphics g,
LinearLabelLayouter layouter)
drawTicksLabels in class Axis2Dg - graphics context
public void drawLabels(AbstractGraphics g,
LinearLabelLayouter layouter)
Axis2D
drawLabels in class Axis2Dg - the Graphics context in which the axis labels to paintlayouter - the Layouter used to layout axis labelsprotected void drawAxis(AbstractGraphics g)
Axis2D
drawAxis in class Axis2Dg - graphics context
public void setTitle(int titleNr,
AxisTitle title)
setTitle in class Axis
protected void drawTitle(AbstractGraphics g,
LinearLabelLayouter layouter,
AxisTitle axisTitle)
Axis2D
drawTitle in class Axis2Dg - the Graphics context in which the axis title to paintlayouter - the label layouter used to layout axis labelsaxisTitle - the axis title to draw
@Deprecated
public static void setStackedYAxisMargin(Chart<Projector2D> chart,
float margin)
chart - Chart for which stacked axis margin is specifiedmargin - relative size in range [0,1]public void setStackAxis2DY(Axis2DY baseAxis)
baseAxis - Y axis, to be used as the base for the axispublic Axis2DY getStackAxis2DY()
public AbstractAxisLabel[] getVisibleLabels()
Axis2D
getVisibleLabels in class Axis2Dprotected Axis2D[] getZoomableAxes()
Axis2D
getZoomableAxes in class Axis2Dprotected Rectangle2D getActiveArea()
getActiveArea in class Axis2Dpublic int getTitleWidth(AbstractGraphics g)
g - the Graphics context in which to paint axis
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||