public class

CategoryMarker

extends Marker
implements Serializable Cloneable
java.lang.Object
   ↳ org.jfree.chart.plot.Marker
     ↳ org.jfree.chart.plot.CategoryMarker

Class Overview

A marker for a category.

Note that for serialization to work correctly, the category key must be an instance of a serializable class.

Summary

Public Constructors
CategoryMarker(Comparable key)
Creates a new category marker for the specified category.
CategoryMarker(Comparable key, Paint paint, Stroke stroke)
Creates a new category marker.
CategoryMarker(Comparable key, Paint paint, Stroke stroke, Paint outlinePaint, Stroke outlineStroke, float alpha)
Creates a new category marker.
Public Methods
boolean equals(Object obj)
Tests the marker for equality with an arbitrary object.
boolean getDrawAsLine()
Returns the flag that controls whether the marker is drawn as a region or a line.
Comparable getKey()
Returns the key.
void setDrawAsLine(boolean drawAsLine)
Sets the flag that controls whether the marker is drawn as a region or as a line, and sends a MarkerChangeEvent to all registered listeners.
void setKey(Comparable key)
Sets the key and sends a MarkerChangeEvent to all registered listeners.
[Expand]
Inherited Methods
From class org.jfree.chart.plot.Marker
From class java.lang.Object

Public Constructors

public CategoryMarker (Comparable key)

Creates a new category marker for the specified category.

Parameters
key the category key.

public CategoryMarker (Comparable key, Paint paint, Stroke stroke)

Creates a new category marker.

Parameters
key the key.
paint the paint (null not permitted).
stroke the stroke (null not permitted).

public CategoryMarker (Comparable key, Paint paint, Stroke stroke, Paint outlinePaint, Stroke outlineStroke, float alpha)

Creates a new category marker.

Parameters
key the key.
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.

Public Methods

public boolean equals (Object obj)

Tests the marker for equality with an arbitrary object.

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

public boolean getDrawAsLine ()

Returns the flag that controls whether the marker is drawn as a region or a line.

Returns
  • A line.

public Comparable getKey ()

Returns the key.

Returns
  • The key.

public void setDrawAsLine (boolean drawAsLine)

Sets the flag that controls whether the marker is drawn as a region or as a line, and sends a MarkerChangeEvent to all registered listeners.

Parameters
drawAsLine the flag.

public void setKey (Comparable key)

Sets the key and sends a MarkerChangeEvent to all registered listeners.

Parameters
key the key (null not permitted).