com.ijchart.xychart.marker
Class ValueMarker

java.lang.Object
  extended by com.ijchart.xychart.marker.AbstractMarker
      extended by com.ijchart.xychart.marker.ValueMarker
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class ValueMarker
extends AbstractMarker
implements java.lang.Cloneable, java.io.Serializable

Title: IJChart

Description: a chart library for the Java(tm) platform.

A marker that represents a single value. Markers can be added to plots to highlight specific values. Such, if the text horizontal alignment is left or center, said the text on-line on the left, otherwise to the right side of the text on-line; if the text vertical alignment is top or center, said the text above, otherwise below the line for the text.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ijchart.xychart.marker.AbstractMarker
DEFAULT_FILL_PAINT, DEFAULT_TEXT_POSITION
 
Constructor Summary
ValueMarker(double value)
           Creates a new marker.
ValueMarker(double value, java.awt.Paint fillPaint)
           Creates a new value marker.
ValueMarker(double value, java.awt.Paint fillPaint, java.awt.Paint borderPaint, java.awt.Stroke borderStroke, float fillAlpha)
           Creates a new value 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 double.
 double getValue()
           Returns the value.
 int hashCode()
           Returns a hash code value for the double.
 void setValue(double value)
           Sets the value and sends a MarkerChangeEvent to all registered listeners.
 java.lang.String toString()
           Returns a string representation of the object.
 
Methods inherited from class com.ijchart.xychart.marker.AbstractMarker
addChangeListener, fireMarkerChanged, getBorderPaint, getBorderStroke, getFillAlpha, getFillPaint, getListeners, getMargin, getText, getTextFont, getTextHorizontalAlign, getTextPaint, getTextPosition, getTextVerticalAlign, isDrawBorder, isDrawText, isFillShape, notifyListeners, removeChangeListener, setBorderPaint, setBorderStroke, setDrawBorder, setDrawText, setFillAlpha, setFillPaint, setFillShape, setMargin, setText, setTextFont, setTextHorizontalAlign, setTextPaint, setTextPosition, setTextVerticalAlign
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueMarker

public ValueMarker(double value)
Creates a new marker.

Parameters:
value - double The value.

ValueMarker

public ValueMarker(double value,
                   java.awt.Paint fillPaint)
Creates a new value marker.

Parameters:
value - double The value.
fillPaint - The fill paint (null not permitted).

ValueMarker

public ValueMarker(double value,
                   java.awt.Paint fillPaint,
                   java.awt.Paint borderPaint,
                   java.awt.Stroke borderStroke,
                   float fillAlpha)
Creates a new value marker.

Parameters:
value - double The value.
fillPaint - The fill paint (null not permitted).
borderPaint - The border paint (null permitted).
borderStroke - The border stroke (null permitted).
fillAlpha - The alpha transparency (must be in the range 0.0f to 1.0f).
Method Detail

getValue

public double getValue()
Returns the value.

Returns:
double The value.

setValue

public void setValue(double value)
Sets the value and sends a MarkerChangeEvent to all registered listeners.

Parameters:
value - The value.

hashCode

public int hashCode()
Returns a hash code value for the double.

Overrides:
hashCode in class AbstractMarker
Returns:
int The hashcode value.

equals

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

Overrides:
equals in class AbstractMarker
Parameters:
obj - the double (null permitted).
Returns:
A boolean.

clone

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

Overrides:
clone in class AbstractMarker
Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException - never.

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class AbstractMarker
Returns:
a string representation of the object.