lt.monarch.chart.marker
Class BaloonLabelMarker

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

public class BaloonLabelMarker
extends AbstractTextMarker

Renders a balloon label marker. Balloon label markers are similar to callouts. ToolTipManager uses the marker as default marker to display tool-tips.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  Rectangle2D tipBounds
           
 
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
BaloonLabelMarker()
          Constructs a new BaloonLabelMarker.
 
Method Summary
Modifier and Type Method and Description
 void dispose()
          Disposes object
 void draw(AbstractGraphics g, SeriesPaintTags tag, Style style)
          Renders the marker on the Graphics context.
 Rectangle2D getBounds()
          Gets bounds of this marker.
 void prepare(AbstractGraphics g)
          Prepares the marker for drawing.
 void reset()
          Resets the marker.
 void setEntity(ChartEntity entity)
          References the entity object, for which the marker is being painted.
 void setTextAlignment(Alignment hAlign, Alignment vAlign)
          Sets horizontal and vertical text alignment for this marker.
 
Methods inherited from class lt.monarch.chart.marker.AbstractTextMarker
applyConstraints, 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, setLocation, setMetaModel, setTransparencyValue, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tipBounds

protected Rectangle2D tipBounds
Constructor Detail

BaloonLabelMarker

public BaloonLabelMarker()
Constructs a new BaloonLabelMarker.

Method Detail

setTextAlignment

public void setTextAlignment(Alignment hAlign,
                             Alignment vAlign)
Sets horizontal and vertical text alignment for this marker.

Specified by:
setTextAlignment in interface Marker
Overrides:
setTextAlignment in class AbstractMarker
Parameters:
hAlign - horizontal alignment. Possible alignments: Alignment.CENTER, Alignment.LEFT, Alignment.RIGHT.
vAlign - vertical alignment. Possible alignments: Alignment.CENTER, Alignment.TOP, Alignment.BOTTOM.

reset

public void reset()
Resets the marker.

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

setEntity

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

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

getBounds

public Rectangle2D getBounds()
Gets bounds of this marker.

Returns:
A rectangle indicating this marker's bounds.

prepare

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

Specified by:
prepare in interface Marker
Overrides:
prepare in class AbstractMarker
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.

Parameters:
g - graphics context
tag - painting tag
style - drawing style

dispose

public void dispose()
Description copied from class: AbstractMarker
Disposes object

Specified by:
dispose in interface Marker
Overrides:
dispose in class AbstractMarker