|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.marker.AbstractMarker
public abstract class AbstractMarker
Title: IJChart
Description: a chart library for the Java(tm) platform.
The base class for markers that can be added to plots to highlight a value or range of values.Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static java.awt.Paint |
DEFAULT_FILL_PAINT
The default fill Paint |
static TextPosition |
DEFAULT_TEXT_POSITION
The default text position. |
Constructor Summary | |
---|---|
protected |
AbstractMarker()
Creates a new marker with default attributes. |
protected |
AbstractMarker(java.awt.Paint fillPaint)
Constructs a new marker. |
protected |
AbstractMarker(java.awt.Paint fillPaint,
java.awt.Paint borderPaint,
java.awt.Stroke borderStroke,
float fillAlpha)
Constructs a new marker. |
Method Summary | |
---|---|
void |
addChangeListener(IMarkerChangeListener 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. |
protected void |
fireMarkerChanged()
Notifies all registered listeners that the dataset has changed. |
java.awt.Paint |
getBorderPaint()
Get the ChartShape border Paint |
java.awt.Stroke |
getBorderStroke()
Get the ChartShape border Stroke |
float |
getFillAlpha()
Returns the alpha value for fill background. |
java.awt.Paint |
getFillPaint()
Get the ChartShape fill paint |
java.util.EventListener[] |
getListeners(java.lang.Class listenerType)
Returns an array containing all the listeners of the specified type. |
RectangleInsets |
getMargin()
Returns the margin around the inside of the block. |
java.lang.String |
getText()
Returns the text. |
java.awt.Font |
getTextFont()
Returns the text font. |
HorizontalAlignment |
getTextHorizontalAlign()
Returns the text horizontal alignment. |
java.awt.Paint |
getTextPaint()
Get the ChartShape text Paint |
TextPosition |
getTextPosition()
Returns the text position. |
VerticalAlignment |
getTextVerticalAlign()
Returns the text vertical alignment. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isDrawBorder()
A flag that controls whether or not the shape border is visible |
boolean |
isDrawText()
Returns a flag that controls whether or not the text is drawn. |
boolean |
isFillShape()
A flag that controls whether or not the shape is filled |
protected void |
notifyListeners(MarkerChangeEvent event)
Notifies all registered listeners that the marker has been modified. |
void |
removeChangeListener(IMarkerChangeListener listener)
Unregisters an object for notification of changes to the marker. |
void |
setBorderPaint(java.awt.Paint paint)
Sets the shape border Paint,and sends a MarkerChangeEvent to all registered listeners. |
void |
setBorderStroke(java.awt.Stroke stroke)
Sets the shape border Stroke,and sends a MarkerChangeEvent to all registered listeners. |
void |
setDrawBorder(boolean flag)
Sets a flag that controls whether or not the shape border is visible,and sends a MarkerChangeEvent to all registered listeners. |
void |
setDrawText(boolean flag)
Sets a flag that controls whether or not the text is drawn and sends an MarkerChangeEvent to all registered listeners. |
void |
setFillAlpha(float alpha)
The alpha value for fill background,and sends a MarkerChangeEvent to all registered listeners. |
void |
setFillPaint(java.awt.Paint paint)
Sets the shape fill Paint,and sends a MarkerChangeEvent to all registered listeners. |
void |
setFillShape(boolean bFillShape)
Sets a flag that controls whether or not the shape is filled,and sends a MarkerChangeEvent to all registered listeners. |
void |
setMargin(RectangleInsets margin)
Sets the margin around the inside of the block,and sends a MarkerChangeEvent to all registered listeners.. |
void |
setText(java.lang.String text)
Sets the text,and sends a MarkerChangeEvent to all registered listeners.. |
void |
setTextFont(java.awt.Font font)
Sets the text font and sends a MarkerChangeEvent to all registered listeners. |
void |
setTextHorizontalAlign(HorizontalAlignment horizontalAlign)
Sets the text horizontal alignment and sends an MarkerChangeEvent to all registered listeners. |
void |
setTextPaint(java.awt.Paint paint)
Sets the shape text Paint and sends an MarkerChangeEvent to all registered listeners. |
void |
setTextPosition(TextPosition position)
Sets the text position and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setTextVerticalAlign(VerticalAlignment verticalAlign)
Sets the text vertical alignment and sends an MarkerChangeEvent to all registered listeners. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final transient java.awt.Paint DEFAULT_FILL_PAINT
public static final TextPosition DEFAULT_TEXT_POSITION
Constructor Detail |
---|
protected AbstractMarker()
protected AbstractMarker(java.awt.Paint fillPaint)
fillPaint
-
The fill paint (null not permitted).protected AbstractMarker(java.awt.Paint fillPaint, java.awt.Paint borderPaint, java.awt.Stroke borderStroke, float fillAlpha)
fillPaint
- Paint
The fill paint (null not permitted).borderPaint
- Paint
The border paint (null permitted).borderStroke
- Stroke
The border stroke (null permitted).fillAlpha
- float
The alpha transparency (must be in the range 0.0f to 1.0f).Method Detail |
---|
public boolean isFillShape()
public void setFillShape(boolean bFillShape)
MarkerChangeEvent
to all registered listeners.
bFillShape
- boolean
true,fill the shape;false otherwisepublic java.awt.Paint getFillPaint()
public void setFillPaint(java.awt.Paint paint)
MarkerChangeEvent
to all registered listeners.
paint
- Paint
The ChartShape fill Paint(null not permitted).public void setFillAlpha(float alpha)
MarkerChangeEvent
to all registered listeners.
alpha
- float
The alpha transparency (in the range 0.0f to 1.0f, where 0.0f is fully transparent,
and 1.0f is fully opaque).public float getFillAlpha()
public java.awt.Paint getBorderPaint()
public void setBorderPaint(java.awt.Paint paint)
MarkerChangeEvent
to all registered listeners.
paint
- Paint
The ChartShape border Paint(null not permitted).public java.awt.Stroke getBorderStroke()
public void setBorderStroke(java.awt.Stroke stroke)
MarkerChangeEvent
to all registered listeners.
stroke
- Stroke
The ChartShape border Stroke(null
not permitted).public boolean isDrawBorder()
public void setDrawBorder(boolean flag)
MarkerChangeEvent
to all registered listeners.
flag
- boolean
true,draw the border of the shape;false otherwisepublic void setText(java.lang.String text)
MarkerChangeEvent
to all registered listeners..
text
- String
The text (null permitted).public java.lang.String getText()
public void setMargin(RectangleInsets margin)
MarkerChangeEvent
to all registered listeners..
margin
- RectangleInsets
The margin around the inside of the block (null permitted).public RectangleInsets getMargin()
public java.awt.Font getTextFont()
public void setTextFont(java.awt.Font font)
MarkerChangeEvent
to all registered listeners.
font
- Font
The text font (null not permitted).public void setDrawText(boolean flag)
MarkerChangeEvent
to all registered listeners.
flag
- booleanpublic boolean isDrawText()
public void setTextPaint(java.awt.Paint paint)
MarkerChangeEvent
to all registered listeners.
paint
- Paint
The ChartShape text Paint(null not permitted).public java.awt.Paint getTextPaint()
public void setTextHorizontalAlign(HorizontalAlignment horizontalAlign)
MarkerChangeEvent
to all registered listeners.
horizontalAlign
- HorizontalAlignment
The text horizontal alignment (null not permitted).public HorizontalAlignment getTextHorizontalAlign()
public void setTextVerticalAlign(VerticalAlignment verticalAlign)
MarkerChangeEvent
to all registered listeners.
verticalAlign
- VerticalAlignment
The text vertical alignment (null not permitted).public VerticalAlignment getTextVerticalAlign()
public TextPosition getTextPosition()
public void setTextPosition(TextPosition position)
ChartShapeChangeEvent
to all registered listeners.
position
- TextPosition
The text position (null not permitted).public void addChangeListener(IMarkerChangeListener listener)
listener
-
The object to be registered.public void removeChangeListener(IMarkerChangeListener listener)
listener
-
The object to be unregistered.protected void notifyListeners(MarkerChangeEvent event)
event
-
Information about the change event.public java.util.EventListener[] getListeners(java.lang.Class listenerType)
listenerType
-
The listener type.
protected void fireMarkerChanged()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object (null permitted).
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- never.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |