|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.title.AbstractTitle
public abstract class AbstractTitle
Title: IJChart
Description: a chart library for the Java(tm) platform.
The abstract implementation of title.Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static float |
DEFAULT_BACKGROUND_ALPHA
The default foreground alpha transparency. |
static java.awt.Paint |
DEFAULT_BACKGROUND_PAINT
The default background fill paint. |
static boolean |
DEFAULT_BORDER_VISIBLE
A default flag that controls whether or not the chart border is drawn. |
static boolean |
DEFAULT_FILL_BACKGROUND
A default flag controls whether or not fill shape with background paint. |
static HorizontalAlignment |
DEFAULT_HORIZONTAL_ALIGNMENT
The default horizontal alignment. |
static boolean |
DEFAULT_NOTIFY
A default flag that can be used to temporarily disable the listener mechanism. |
static RectangleInsets |
DEFAULT_PADDING
Default title padding. |
static RectangleEdge |
DEFAULT_TITLE_POSITION
The default title position. |
static VerticalAlignment |
DEFAULT_VERTICAL_ALIGNMENT
The default vertical alignment. |
Constructor Summary | |
---|---|
protected |
AbstractTitle()
Creates a new title, using default attributes where necessary. |
protected |
AbstractTitle(RectangleEdge position,
HorizontalAlignment horizontalAlignment,
VerticalAlignment verticalAlignment)
Creates a new title, using default attributes where necessary. |
protected |
AbstractTitle(RectangleEdge position,
HorizontalAlignment horizontalAlignment,
VerticalAlignment verticalAlignment,
RectangleInsets padding)
Creates a new title. |
Method Summary | |
---|---|
void |
addChangeListener(ITitleChangeListener listener)
Registers an object for notification of changes to the title. |
java.lang.Object |
clone()
Returns a clone of the title. |
boolean |
equals(java.lang.Object obj)
Tests an object for equality with this title. |
protected void |
fireTitleChanged()
Notifies all registered listeners that the dataset has changed. |
float |
getBackgroundAlpha()
Returns the alpha transparency of the plot area background. |
java.awt.Paint |
getBackgroundPaint()
Returns the background paint. |
java.awt.Paint |
getBorderPaint()
Returns the paint used to draw the chart border (if visible). |
java.awt.Stroke |
getBorderStroke()
Returns the stroke used to draw the chart border (if visible). |
HorizontalAlignment |
getHorizontalAlignment()
Returns the horizontal alignment of the title. |
boolean |
getNotify()
Returns the flag that indicates whether or not the notification mechanism is enabled. |
RectangleInsets |
getPadding()
Returns the title padding. |
RectangleEdge |
getPosition()
Returns the position of the title. |
java.lang.String |
getToolTipText()
Returns the tool tip text. |
java.lang.String |
getURLText()
Returns the URL text. |
VerticalAlignment |
getVerticalAlignment()
Returns the vertical alignment of the title. |
int |
hashCode()
Returns a hashcode for the title. |
boolean |
hasListener(java.util.EventListener listener)
Returns true if the specified object is registered with the dataset as a listener. |
boolean |
isBorderVisible()
Returns a flag that controls whether or not a border is drawn around the outside of the chart. |
boolean |
isFillBackground()
Returns whether or not fill shape with background paint. |
protected void |
notifyListeners(TitleChangeEvent event)
Notifies all registered listeners that the chart title has changed in some way. |
void |
removeAllChangeListener()
Deregisters all object for notification of changes to the axis. |
void |
removeChangeListener(ITitleChangeListener listener)
Unregisters an object for notification of changes to the chart title. |
void |
setBackgroundAlpha(float alpha)
Sets the alpha transparency of the plot area background, and notifies registered listeners that the plot has been modified. |
void |
setBackgroundPaint(java.awt.Paint paint)
Sets the background paint and sends a TitleChangeEvent to all
registered listeners. |
void |
setBorderPaint(java.awt.Paint paint)
Sets the paint used to draw the chart border (if visible),and sends a TitleChangeEvent to all registered listeners. |
void |
setBorderStroke(java.awt.Stroke stroke)
Sets the stroke used to draw the chart border (if visible),and sends a TitleChangeEvent to all registered listeners. |
void |
setBorderVisible(boolean visible)
Sets a flag that controls whether or not a border is drawn around the outside of the chart,and sends a TitleChangeEvent to all registered listeners. |
void |
setFillBackground(boolean flag)
Sets whether or not fill shape with background paint and sends a TitleChangeEvent
to all registered listeners. |
void |
setHorizontalAlignment(HorizontalAlignment alignment)
Sets the horizontal alignment for the title and sends a TitleChangeEvent to all registered listeners. |
void |
setNotify(boolean flag)
Sets the flag that indicates whether or not the notification mechanism is enabled. |
void |
setPadding(RectangleInsets padding)
Sets the title padding, and notifies any registered listeners of the change. |
void |
setPosition(RectangleEdge position)
Sets the position for the title and sends a TitleChangeEvent to
all registered listeners. |
void |
setToolTipText(java.lang.String tooltip)
Sets the tool tip text to the specified text and sends a TitleChangeEvent to all registered listeners. |
void |
setURLText(java.lang.String url)
Sets the URL text to the specified text and sends a TitleChangeEvent to all registered listeners. |
void |
setVerticalAlignment(VerticalAlignment alignment)
Sets the vertical alignment for the title, and notifies any registered listeners of the change. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ijchart.xychart.title.ITitle |
---|
draw |
Field Detail |
---|
public static final RectangleEdge DEFAULT_TITLE_POSITION
public static final HorizontalAlignment DEFAULT_HORIZONTAL_ALIGNMENT
public static final VerticalAlignment DEFAULT_VERTICAL_ALIGNMENT
public static final RectangleInsets DEFAULT_PADDING
public static final java.awt.Paint DEFAULT_BACKGROUND_PAINT
public static final boolean DEFAULT_BORDER_VISIBLE
public static final boolean DEFAULT_FILL_BACKGROUND
public static final boolean DEFAULT_NOTIFY
public static final float DEFAULT_BACKGROUND_ALPHA
Constructor Detail |
---|
protected AbstractTitle()
protected AbstractTitle(RectangleEdge position, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment)
position
- RectangleEdge
The position of the title (null not permitted).horizontalAlignment
- HorizontalAlignment
The horizontal alignment of the title (null not permitted).verticalAlignment
- VerticalAlignment
The vertical alignment of the title (null not permitted).protected AbstractTitle(RectangleEdge position, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, RectangleInsets padding)
position
- RectangleEdge
The position of the title (null not permitted).horizontalAlignment
- HorizontalAlignment
The horizontal alignment of the title (null not permitted).verticalAlignment
- VerticalAlignment
The vertical alignment of the title (null not permitted).padding
- RectangleInsets
The title padding.Method Detail |
---|
public RectangleEdge getPosition()
public void setPosition(RectangleEdge position)
TitleChangeEvent
to
all registered listeners.
position
- RectangleEdge
The position (null not permitted).public HorizontalAlignment getHorizontalAlignment()
public void setHorizontalAlignment(HorizontalAlignment alignment)
TitleChangeEvent
to all registered listeners.
alignment
- HorizontalAlignment
The horizontal alignment (null not permitted).public VerticalAlignment getVerticalAlignment()
public void setVerticalAlignment(VerticalAlignment alignment)
alignment
- VerticalAlignment
The new vertical alignment (null not permitted).public boolean getNotify()
public void setNotify(boolean flag)
flag
- boolean
The new value of the flag.public RectangleInsets getPadding()
public void setPadding(RectangleInsets padding)
padding
- RectangleInsets
The title padding (null not permitted).public java.lang.String getToolTipText()
public void setToolTipText(java.lang.String tooltip)
TitleChangeEvent
to all registered listeners.
tooltip
- String
The text (null permitted).public java.lang.String getURLText()
public void setURLText(java.lang.String url)
TitleChangeEvent
to all registered listeners.
url
- String
The URL string (null permitted).public boolean isFillBackground()
public void setFillBackground(boolean flag)
TitleChangeEvent
to all registered listeners.
flag
- boolean
A boolean.public java.awt.Paint getBackgroundPaint()
public void setBackgroundPaint(java.awt.Paint paint)
TitleChangeEvent
to all
registered listeners. If you set this attribute to null,
no background is painted (which makes the title background transparent).
paint
- Paint
The background paint (null permitted).public float getBackgroundAlpha()
public void setBackgroundAlpha(float alpha)
alpha
-
The new alpha value (in the range 0.0f to 1.0f).public boolean isBorderVisible()
public void setBorderVisible(boolean visible)
TitleChangeEvent
to all registered listeners.
visible
- boolean
A boolean.public java.awt.Stroke getBorderStroke()
public void setBorderStroke(java.awt.Stroke stroke)
TitleChangeEvent
to all registered listeners.
stroke
- Stroke
The stroke (null not permitted).public java.awt.Paint getBorderPaint()
public void setBorderPaint(java.awt.Paint paint)
TitleChangeEvent
to all registered listeners.
paint
- Paint
The paint (null not permitted).public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- not thrown by this class, but it may
be thrown by subclasses.public void addChangeListener(ITitleChangeListener listener)
listener
- ITitleChangeListener
The object that is being registered.public void removeChangeListener(ITitleChangeListener listener)
listener
- ITitleChangeListener
The object that is being unregistered.public void removeAllChangeListener()
public boolean hasListener(java.util.EventListener listener)
listener
- the listener.
protected void fireTitleChanged()
protected void notifyListeners(TitleChangeEvent event)
event
- TitleChangeEvent
An object that contains information about the change to the title.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object Tthe object (null not permitted).
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |