org.jfree.chart
Class Marker

java.lang.Object
  extended byorg.jfree.chart.Marker
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
IntervalMarker

public class Marker
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

A constant value that is drawn on a chart as a marker, usually as a horizontal or a vertical line.

In addition to a value, this class defines paint attributes to give some control over the appearance of the marker. The renderer can, however, override these settings if it chooses.

Author:
David Gilbert
See Also:
Serialized Form

Constructor Summary
Marker(double value)
          Constructs a new marker.
Marker(double value, java.awt.Paint outlinePaint)
          Constructs a new marker.
Marker(double value, java.awt.Paint outlinePaint, java.awt.Stroke outlineStroke, java.awt.Paint paint, float alpha)
          Constructs a new marker.
 
Method Summary
 boolean equals(java.lang.Object object)
          Tests an object for equality with this instance.
 float getAlpha()
          Returns the alpha transparency.
 java.lang.String getLabel()
          Returns the label (if null no label is displayed).
 java.awt.Font getLabelFont()
          Returns the label font.
 java.awt.Paint getLabelPaint()
          Returns the label paint.
 MarkerLabelPosition getLabelPosition()
          Returns the label position.
 java.awt.Paint getOutlinePaint()
          Returns the outline paint.
 java.awt.Stroke getOutlineStroke()
          Returns the outline stroke.
 java.awt.Paint getPaint()
          Returns the paint.
 double getValue()
          Returns the value.
 void setLabel(java.lang.String label)
          Sets the label (if null no label is displayed).
 void setLabelFont(java.awt.Font font)
          Sets the label font.
 void setLabelPaint(java.awt.Paint paint)
          Sets the label paint.
 void setLabelPosition(MarkerLabelPosition position)
          Sets the label position.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Marker

public Marker(double value)
Constructs a new marker.

Parameters:
value - the value.

Marker

public Marker(double value,
              java.awt.Paint outlinePaint)
Constructs a new marker.

Parameters:
value - the value.
outlinePaint - the paint.

Marker

public Marker(double value,
              java.awt.Paint outlinePaint,
              java.awt.Stroke outlineStroke,
              java.awt.Paint paint,
              float alpha)
Constructs a new marker.

Parameters:
value - the value.
outlinePaint - the outline paint (null not permitted).
outlineStroke - the outline stroke (null not permitted).
paint - the paint (null not permitted).
alpha - the alpha transparency.
Method Detail

getValue

public double getValue()
Returns the value.

Returns:
the value.

getOutlinePaint

public java.awt.Paint getOutlinePaint()
Returns the outline paint.

Returns:
the outline paint.

getOutlineStroke

public java.awt.Stroke getOutlineStroke()
Returns the outline stroke.

Returns:
the outline stroke.

getPaint

public java.awt.Paint getPaint()
Returns the paint.

Returns:
the paint.

getAlpha

public float getAlpha()
Returns the alpha transparency.

Returns:
the alpha transparency.

getLabel

public java.lang.String getLabel()
Returns the label (if null no label is displayed).

Returns:
The label (possibly null).

setLabel

public void setLabel(java.lang.String label)
Sets the label (if null no label is displayed).

Parameters:
label - the label (null permitted).

getLabelFont

public java.awt.Font getLabelFont()
Returns the label font.

Returns:
the label font (never null).

setLabelFont

public void setLabelFont(java.awt.Font font)
Sets the label font.

Parameters:
font - the font (null not permitted).

getLabelPaint

public java.awt.Paint getLabelPaint()
Returns the label paint.

Returns:
the label paint (never null).

setLabelPaint

public void setLabelPaint(java.awt.Paint paint)
Sets the label paint.

Parameters:
paint - the paint (null not permitted).

getLabelPosition

public MarkerLabelPosition getLabelPosition()
Returns the label position.

Returns:
The label position.

setLabelPosition

public void setLabelPosition(MarkerLabelPosition position)
Sets the label position.

Parameters:
position - the position.

equals

public boolean equals(java.lang.Object object)
Tests an object for equality with this instance.

Parameters:
object - the object to test.
Returns:
A boolean.