public abstract class Marker
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private float |
alpha
The alpha transparency.
|
private java.lang.String |
label
The label.
|
private org.jfree.ui.RectangleAnchor |
labelAnchor
The label position.
|
private java.awt.Color |
labelBackgroundColor
The label background color.
|
private java.awt.Font |
labelFont
The label font.
|
private org.jfree.ui.RectangleInsets |
labelOffset
The label offset from the marker rectangle.
|
private org.jfree.ui.LengthAdjustmentType |
labelOffsetType
The offset type for the domain or range axis (never
null). |
private java.awt.Paint |
labelPaint
The label paint.
|
private org.jfree.ui.TextAnchor |
labelTextAnchor
The text anchor for the label.
|
private javax.swing.event.EventListenerList |
listenerList
Storage for registered change listeners.
|
private java.awt.Paint |
outlinePaint
The outline paint.
|
private java.awt.Stroke |
outlineStroke
The outline stroke.
|
private java.awt.Paint |
paint
The paint (null is not allowed).
|
private static long |
serialVersionUID
For serialization.
|
private java.awt.Stroke |
stroke
The stroke (null is not allowed).
|
| Modifier | Constructor and Description |
|---|---|
protected |
Marker()
Creates a new marker with default attributes.
|
protected |
Marker(java.awt.Paint paint)
Constructs a new marker.
|
protected |
Marker(java.awt.Paint paint,
java.awt.Stroke stroke,
java.awt.Paint outlinePaint,
java.awt.Stroke outlineStroke,
float alpha)
Constructs a new marker.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(MarkerChangeListener listener)
Registers an object for notification of changes to the marker.
|
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). |
org.jfree.ui.RectangleAnchor |
getLabelAnchor()
Returns the label anchor.
|
java.awt.Color |
getLabelBackgroundColor()
Returns the label background color.
|
java.awt.Font |
getLabelFont()
Returns the label font.
|
org.jfree.ui.RectangleInsets |
getLabelOffset()
Returns the label offset.
|
org.jfree.ui.LengthAdjustmentType |
getLabelOffsetType()
Returns the label offset type.
|
java.awt.Paint |
getLabelPaint()
Returns the label paint.
|
org.jfree.ui.TextAnchor |
getLabelTextAnchor()
Returns the label text anchor.
|
java.util.EventListener[] |
getListeners(java.lang.Class listenerType)
Returns an array containing all the listeners of the specified type.
|
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 |
notifyListeners(MarkerChangeEvent event)
Notifies all registered listeners that the marker has been modified.
|
private void |
readObject(java.io.ObjectInputStream stream)
Provides serialization support.
|
void |
removeChangeListener(MarkerChangeListener listener)
Unregisters an object for notification of changes to the marker.
|
void |
setAlpha(float alpha)
Sets the alpha transparency that should be used when drawing the
marker, and sends a
MarkerChangeEvent to all registered
listeners. |
void |
setLabel(java.lang.String label)
Sets the label (if
null no label is displayed) and sends a
MarkerChangeEvent to all registered listeners. |
void |
setLabelAnchor(org.jfree.ui.RectangleAnchor anchor)
Sets the label anchor and sends a
MarkerChangeEvent to all
registered listeners. |
void |
setLabelBackgroundColor(java.awt.Color color)
Sets the label background color.
|
void |
setLabelFont(java.awt.Font font)
Sets the label font and sends a
MarkerChangeEvent to all
registered listeners. |
void |
setLabelOffset(org.jfree.ui.RectangleInsets offset)
Sets the label offset and sends a
MarkerChangeEvent to all
registered listeners. |
void |
setLabelOffsetType(org.jfree.ui.LengthAdjustmentType adj)
Sets the label offset type and sends a
MarkerChangeEvent to all
registered listeners. |
void |
setLabelPaint(java.awt.Paint paint)
Sets the label paint and sends a
MarkerChangeEvent to all
registered listeners. |
void |
setLabelTextAnchor(org.jfree.ui.TextAnchor anchor)
Sets the label text anchor and sends a
MarkerChangeEvent to
all registered listeners. |
void |
setOutlinePaint(java.awt.Paint paint)
Sets the outline paint and sends a
MarkerChangeEvent to all
registered listeners. |
void |
setOutlineStroke(java.awt.Stroke stroke)
Sets the outline stroke and sends a
MarkerChangeEvent to all
registered listeners. |
void |
setPaint(java.awt.Paint paint)
Sets the paint and sends a
MarkerChangeEvent to all registered
listeners. |
void |
setStroke(java.awt.Stroke stroke)
Sets the stroke and sends a
MarkerChangeEvent to all registered
listeners. |
private void |
writeObject(java.io.ObjectOutputStream stream)
Provides serialization support.
|
private static final long serialVersionUID
private transient java.awt.Paint paint
private transient java.awt.Stroke stroke
private transient java.awt.Paint outlinePaint
private transient java.awt.Stroke outlineStroke
private float alpha
private java.lang.String label
private java.awt.Font labelFont
private transient java.awt.Paint labelPaint
private java.awt.Color labelBackgroundColor
private org.jfree.ui.RectangleAnchor labelAnchor
private org.jfree.ui.TextAnchor labelTextAnchor
private org.jfree.ui.RectangleInsets labelOffset
private org.jfree.ui.LengthAdjustmentType labelOffsetType
null).private transient javax.swing.event.EventListenerList listenerList
protected Marker()
protected Marker(java.awt.Paint paint)
paint - the paint (null not permitted).protected Marker(java.awt.Paint paint,
java.awt.Stroke stroke,
java.awt.Paint outlinePaint,
java.awt.Stroke outlineStroke,
float alpha)
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 (must be in the range 0.0f to
1.0f).java.lang.IllegalArgumentException - if paint or
stroke is null, or alpha is
not in the specified range.public java.awt.Paint getPaint()
null).setPaint(Paint)public void setPaint(java.awt.Paint paint)
MarkerChangeEvent to all registered
listeners.paint - the paint (null not permitted).getPaint()public java.awt.Stroke getStroke()
null).setStroke(Stroke)public void setStroke(java.awt.Stroke stroke)
MarkerChangeEvent to all registered
listeners.stroke - the stroke (nullnot permitted).getStroke()public java.awt.Paint getOutlinePaint()
null).setOutlinePaint(Paint)public void setOutlinePaint(java.awt.Paint paint)
MarkerChangeEvent to all
registered listeners.paint - the paint (null permitted).getOutlinePaint()public java.awt.Stroke getOutlineStroke()
null).setOutlineStroke(Stroke)public void setOutlineStroke(java.awt.Stroke stroke)
MarkerChangeEvent to all
registered listeners.stroke - the stroke (null permitted).getOutlineStroke()public float getAlpha()
setAlpha(float)public void setAlpha(float alpha)
MarkerChangeEvent to all registered
listeners. The alpha transparency is a value in the range 0.0f
(completely transparent) to 1.0f (completely opaque).alpha - the alpha transparency (must be in the range 0.0f to
1.0f).java.lang.IllegalArgumentException - if alpha is not in the
specified range.getAlpha()public java.lang.String getLabel()
null no label is displayed).null).setLabel(String)public void setLabel(java.lang.String label)
null no label is displayed) and sends a
MarkerChangeEvent to all registered listeners.label - the label (null permitted).getLabel()public java.awt.Font getLabelFont()
null).setLabelFont(Font)public void setLabelFont(java.awt.Font font)
MarkerChangeEvent to all
registered listeners.font - the font (null not permitted).getLabelFont()public java.awt.Paint getLabelPaint()
null).setLabelPaint(Paint)public void setLabelPaint(java.awt.Paint paint)
MarkerChangeEvent to all
registered listeners.paint - the paint (null not permitted).getLabelPaint()public java.awt.Color getLabelBackgroundColor()
Color(100, 100, 100, 100)..null).public void setLabelBackgroundColor(java.awt.Color color)
color - the color (null not permitted).public org.jfree.ui.RectangleAnchor getLabelAnchor()
null).setLabelAnchor(RectangleAnchor)public void setLabelAnchor(org.jfree.ui.RectangleAnchor anchor)
MarkerChangeEvent to all
registered listeners. The anchor defines the position of the label
anchor, relative to the bounds of the marker.anchor - the anchor (null not permitted).getLabelAnchor()public org.jfree.ui.RectangleInsets getLabelOffset()
null).setLabelOffset(RectangleInsets)public void setLabelOffset(org.jfree.ui.RectangleInsets offset)
MarkerChangeEvent to all
registered listeners.offset - the label offset (null not permitted).getLabelOffset()public org.jfree.ui.LengthAdjustmentType getLabelOffsetType()
null).setLabelOffsetType(LengthAdjustmentType)public void setLabelOffsetType(org.jfree.ui.LengthAdjustmentType adj)
MarkerChangeEvent to all
registered listeners.adj - the type (null not permitted).getLabelOffsetType()public org.jfree.ui.TextAnchor getLabelTextAnchor()
null).setLabelTextAnchor(TextAnchor)public void setLabelTextAnchor(org.jfree.ui.TextAnchor anchor)
MarkerChangeEvent to
all registered listeners.anchor - the label text anchor (null not permitted).getLabelTextAnchor()public void addChangeListener(MarkerChangeListener listener)
listener - the object to be registered.removeChangeListener(MarkerChangeListener)public void removeChangeListener(MarkerChangeListener listener)
listener - the object to be unregistered.addChangeListener(MarkerChangeListener)public void notifyListeners(MarkerChangeEvent event)
event - information about the change event.public java.util.EventListener[] getListeners(java.lang.Class listenerType)
listenerType - the listener type.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - never.private void writeObject(java.io.ObjectOutputStream stream)
throws java.io.IOException
stream - the output stream.java.io.IOException - if there is an I/O error.private void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
stream - the input stream.java.io.IOException - if there is an I/O error.java.lang.ClassNotFoundException - if there is a classpath problem.