org.jfree.chart.plot
Class Marker

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

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

The base class for markers that can be added to plots to highlight a value or range of values.

See Also:
Serialized Form

Constructor Summary
protected Marker()
          Creates a new marker with default attributes.
protected Marker(java.awt.Paint paint)
          Constructs a new marker.
  Marker(java.awt.Paint paint, java.awt.Stroke stroke, java.awt.Paint outlinePaint, java.awt.Stroke outlineStroke, float alpha)
          Constructs a new marker.
 
Method Summary
 java.lang.Object clone()
          Creates a clone of the marker.
 boolean equals(java.lang.Object obj)
          Tests the marker for equality with an arbitrary object.
 float getAlpha()
          Returns the alpha transparency.
 java.lang.String getLabel()
          Returns the label (if null no label is displayed).
 RectangleAnchor getLabelAnchor()
          Returns the label anchor.
 java.awt.Font getLabelFont()
          Returns the label font.
 RectangleInsets getLabelOffset()
          Returns the label offset.
 LengthAdjustmentType getLabelOffsetTypeForDomain()
          Returns the label offset type for the offset along the domain axis.
 LengthAdjustmentType getLabelOffsetTypeForRange()
          Returns the label offset type for the offset along the range axis.
 java.awt.Paint getLabelPaint()
          Returns the label paint.
 TextAnchor getLabelTextAnchor()
          Returns the label text anchor.
 java.awt.Paint getOutlinePaint()
          Returns the outline paint.
 java.awt.Stroke getOutlineStroke()
          Returns the outline stroke.
 java.awt.Paint getPaint()
          Returns the paint.
 java.awt.Stroke getStroke()
          Returns the stroke.
 void setAlpha(float alpha)
          Sets the alpha transparency.
 void setLabel(java.lang.String label)
          Sets the label (if null no label is displayed).
 void setLabelAnchor(RectangleAnchor anchor)
          Sets the label anchor.
 void setLabelFont(java.awt.Font font)
          Sets the label font.
 void setLabelOffset(RectangleInsets offset)
          Sets the label offset.
 void setLabelOffsetTypeForDomain(LengthAdjustmentType adj)
          Sets the label offset type for the offset along the domain axis.
 void setLabelOffsetTypeForRange(LengthAdjustmentType adj)
          Sets the label offset type for the offset along the range axis.
 void setLabelPaint(java.awt.Paint paint)
          Sets the label paint.
 void setLabelTextAnchor(TextAnchor anchor)
          Sets the label text anchor.
 void setOutlinePaint(java.awt.Paint paint)
          Sets the outline paint.
 void setOutlineStroke(java.awt.Stroke stroke)
          Sets the outline stroke.
 void setPaint(java.awt.Paint paint)
          Sets the paint.
 void setStroke(java.awt.Stroke stroke)
          Sets the stroke.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Marker

protected Marker()
Creates a new marker with default attributes.


Marker

protected Marker(java.awt.Paint paint)
Constructs a new marker.

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

Marker

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

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

getPaint

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

Returns:
The paint (never null).

setPaint

public void setPaint(java.awt.Paint paint)
Sets the paint.

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

getStroke

public java.awt.Stroke getStroke()
Returns the stroke.

Returns:
The stroke (never null).

setStroke

public void setStroke(java.awt.Stroke stroke)
Sets the stroke.

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

getOutlinePaint

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

Returns:
The outline paint (possibly null).

setOutlinePaint

public void setOutlinePaint(java.awt.Paint paint)
Sets the outline paint.

Parameters:
paint - the paint (null permitted).

getOutlineStroke

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

Returns:
The outline stroke (possibly null).

setOutlineStroke

public void setOutlineStroke(java.awt.Stroke stroke)
Sets the outline stroke.

Parameters:
stroke - the stroke (null permitted).

getAlpha

public float getAlpha()
Returns the alpha transparency.

Returns:
The alpha transparency.

setAlpha

public void setAlpha(float alpha)
Sets the alpha transparency.

Parameters:
alpha - 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).

getLabelAnchor

public RectangleAnchor getLabelAnchor()
Returns the label anchor.

Returns:
The label anchor (never null).

setLabelAnchor

public void setLabelAnchor(RectangleAnchor anchor)
Sets the label anchor.

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

getLabelOffset

public RectangleInsets getLabelOffset()
Returns the label offset.

Returns:
The label offset (never null).

setLabelOffset

public void setLabelOffset(RectangleInsets offset)
Sets the label offset.

Parameters:
offset - the label offset (null not permitted).

getLabelOffsetTypeForDomain

public LengthAdjustmentType getLabelOffsetTypeForDomain()
Returns the label offset type for the offset along the domain axis.

Returns:
The type.

setLabelOffsetTypeForDomain

public void setLabelOffsetTypeForDomain(LengthAdjustmentType adj)
Sets the label offset type for the offset along the domain axis.

Parameters:
adj - the type.

getLabelOffsetTypeForRange

public LengthAdjustmentType getLabelOffsetTypeForRange()
Returns the label offset type for the offset along the range axis.

Returns:
The type.

setLabelOffsetTypeForRange

public void setLabelOffsetTypeForRange(LengthAdjustmentType adj)
Sets the label offset type for the offset along the range axis.

Parameters:
adj - the type.

getLabelTextAnchor

public TextAnchor getLabelTextAnchor()
Returns the label text anchor.

Returns:
The label text anchor (never null).

setLabelTextAnchor

public void setLabelTextAnchor(TextAnchor anchor)
Sets the label text anchor.

Parameters:
anchor - the label text anchor (null not permitted).

equals

public boolean equals(java.lang.Object obj)
Tests the marker for equality with an arbitrary object.

Parameters:
obj - the object (null permitted).
Returns:
A boolean.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates a clone of the marker.

Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException - never.