lt.monarch.chart.marker
Class MiddleLineMarker

java.lang.Object
  extended by lt.monarch.chart.marker.AbstractMarker
      extended by lt.monarch.chart.marker.AbstractTextMarker
          extended by lt.monarch.chart.marker.LabeledMarker
              extended by lt.monarch.chart.marker.MiddleLineMarker
All Implemented Interfaces:
java.io.Serializable, Marker, StyleEditorEntity

public class MiddleLineMarker
extends LabeledMarker

Only for LineSeries

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
 
Fields inherited from class lt.monarch.chart.marker.LabeledMarker
horizontalLabelAlignment, labelBounds, nestedMarker, offsetX, offsetY, useLabelAlignWithOffset, verticalLabelAlignment
 
Fields inherited from class lt.monarch.chart.marker.AbstractTextMarker
chart, defaultBackground, painter, textStyle
 
Fields inherited from class lt.monarch.chart.marker.AbstractMarker
dirty, map, metaModel, paintStyle, projectedLocation, style
 
Constructor Summary
Constructor and Description
MiddleLineMarker()
          Constructs a new LabeledMarker.
MiddleLineMarker(Marker marker, MetaDataModel metaModel)
          Constructs a new LabeledMarker with the specified nested marker.
MiddleLineMarker(MetaDataModel metaModel)
          Constructs a new LabeledMarker.
 
Method Summary
Modifier and Type Method and Description
 void draw(AbstractGraphics g, SeriesPaintTags tag, Style style)
          Renders the marker on the Graphics context.
 void prepare(AbstractGraphics g)
          Prepares the marker for drawing.
 void reset()
          Resets the marker after use.
 void setEntity(ChartEntity entity)
          References the entity object, for which the marker is being painted.
 void setLocation(Projector projector, GeneralPoint npt)
          Sets location of the marker.
 
Methods inherited from class lt.monarch.chart.marker.LabeledMarker
applyConstraints, dispose, drawConnectionLine, drawMarkerText, drawNestedMarker, getBounds, getConnectionColor, getHorizontalLabelAlignment, getLabelBounds, getNestedMarker, getVerticalLabelAlignment, setConnectionColor, setLabelAlignment, setOffset, setText, setTextAlignment
 
Methods inherited from class lt.monarch.chart.marker.AbstractTextMarker
getPainter, getParent, getStyle, getTextStyle, isAdjustingForNonFittingBars, setAdjustingForNonFittingBars
 
Methods inherited from class lt.monarch.chart.marker.AbstractMarker
clearChartObjectsMap, draw, finalize, getChartObjectBounds, getMetaModel, getPaintStyle, getTransparencyValue, isVisible, mapChartObject, setChartObjectsMap, setMetaModel, setTransparencyValue, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiddleLineMarker

public MiddleLineMarker()
Constructs a new LabeledMarker. A new NullMarker is used as nested marker.


MiddleLineMarker

public MiddleLineMarker(MetaDataModel metaModel)
Constructs a new LabeledMarker. A new NullMarker is used as nested marker.

Parameters:
metaModel - meta data model

MiddleLineMarker

public MiddleLineMarker(Marker marker,
                        MetaDataModel metaModel)
Constructs a new LabeledMarker with the specified nested marker.

Parameters:
marker - the nested marker
metaModel - meta data model
Method Detail

setEntity

public void setEntity(ChartEntity entity)
References the entity object, for which the marker is being painted. Short description of the entity is used to create label.

Specified by:
setEntity in interface Marker
Overrides:
setEntity in class LabeledMarker
Parameters:
entity - the referenced chart entity

setLocation

public void setLocation(Projector projector,
                        GeneralPoint npt)
Sets location of the marker.

Specified by:
setLocation in interface Marker
Overrides:
setLocation in class LabeledMarker
Parameters:
projector - projector used to project the normalized point
npt - normalized point that specifies marker position

reset

public void reset()
Resets the marker after use.

Specified by:
reset in interface Marker
Overrides:
reset in class LabeledMarker

prepare

public void prepare(AbstractGraphics g)
Prepares the marker for drawing.

Specified by:
prepare in interface Marker
Overrides:
prepare in class LabeledMarker
Parameters:
g - graphics context

draw

public void draw(AbstractGraphics g,
                 SeriesPaintTags tag,
                 Style style)
Description copied from interface: Marker
Renders the marker on the Graphics context. Uses style colors.

Specified by:
draw in interface Marker
Overrides:
draw in class LabeledMarker
Parameters:
g - graphics context
tag - painting tag
style - drawing style