|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.monitorenter.gui.chart.IAxis.AxisTitle
public static final class IAxis.AxisTitle
Represents a title of an axis.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_TITLE
Constant for a of the
title font. |
static java.lang.String |
PROPERTY_TITLECOLOR
Constant for a of the
title font. |
static java.lang.String |
PROPERTY_TITLEFONT
Constant for a of the
title font. |
static java.lang.String |
PROPERTY_TITLEPAINTER
Constant for a of the
title font. |
Constructor Summary | |
---|---|
IAxis.AxisTitle(java.lang.String title)
Creates an instance with the given title backed by a . |
|
IAxis.AxisTitle(java.lang.String title,
IAxisTitlePainter painter)
Creates an instance with the given title backed by the given painter. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Add a listener for the given property. |
protected java.lang.Object |
clone()
|
int |
getHeight(IAxis<?> axis,
java.awt.Graphics2D g2d)
Returns the height of this axis title in px with respect to the current title of the given axis. |
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String propertyName)
Returns an array of all the listeners that were added to the this instance with addPropertyChangeListener(String, PropertyChangeListener) . |
java.lang.String |
getTitle()
Returns the title or null if there was no title configured
before. |
java.awt.Color |
getTitleColor()
Returns the color used for painting the title. |
java.awt.Font |
getTitleFont()
Returns the optional font used for painting the title or null if not configured. |
IAxisTitlePainter |
getTitlePainter()
Returns the titlePainter. |
int |
getWidth(IAxis<?> axis,
java.awt.Graphics2D g2d)
Returns the width of this axis title in px with respect to the current title of the given axis. |
void |
removePropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. |
java.lang.String |
setTitle(java.lang.String title)
Sets the title or null if there should be no title. |
void |
setTitleColor(java.awt.Color color)
Sets the title color to use. |
void |
setTitleFont(java.awt.Font font)
Sets the optional title font to use. |
IAxisTitlePainter |
setTitlePainter(IAxisTitlePainter titlePainter)
Sets the titlePainter. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_TITLE
PropertyChangeEvent
of the
title font.
public static final java.lang.String PROPERTY_TITLECOLOR
PropertyChangeEvent
of the
title font.
public static final java.lang.String PROPERTY_TITLEFONT
PropertyChangeEvent
of the
title font.
public static final java.lang.String PROPERTY_TITLEPAINTER
PropertyChangeEvent
of the
title font.
Constructor Detail |
---|
public IAxis.AxisTitle(java.lang.String title)
AxisTitlePainterDefault
.
title
- the title to use.public IAxis.AxisTitle(java.lang.String title, IAxisTitlePainter painter)
title
- the title to use.painter
- the painter to use.Method Detail |
---|
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
The following
types
should be fired to listeners:PropertyChangeEvent
getPropertyName() |
getSource() |
getOldValue() |
getNewValue() |
---|---|---|---|
|
that changed |
, the old value. |
, the new value. |
|
that changed |
, the old value. |
, the new value. |
|
that changed |
, the old value. |
, the new value. |
|
that changed |
, the old value. |
, the new value. |
propertyName
- the property to be informed about changes.listener
- the listener that will be informed.protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
Object.clone()
public int getHeight(IAxis<?> axis, java.awt.Graphics2D g2d)
axis
- the instance this title painter is working for.g2d
- needed for size informations (e.g. font widths).
public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String propertyName)
addPropertyChangeListener(String, PropertyChangeListener)
.
propertyName
- The name of the property being listened to.
addPropertyChangeListener(String, PropertyChangeListener)
.PropertyChangeSupport.getPropertyChangeListeners(java.lang.String)
public final java.lang.String getTitle()
null
if there was no title configured
before.
null
if there was no title configured
before.public java.awt.Color getTitleColor()
Default is
.
Color.BLACK
public java.awt.Font getTitleFont()
public final IAxisTitlePainter getTitlePainter()
public int getWidth(IAxis<?> axis, java.awt.Graphics2D g2d)
axis
- the instance this title painter is working for.g2d
- needed for size informations (e.g. font widths).
public void removePropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
listener
was added more than once to the same event source
for the specified property, it will be notified one less time after being
removed. If propertyName
is null, no exception is thrown and
no action is taken. If listener
is null, or was never added
for the specified property, no exception is thrown and no action is
taken.
property
- The name of the property that was listened on.listener
- The PropertyChangeListener to be removed.PropertyChangeSupport.removePropertyChangeListener(java.lang.String,
java.beans.PropertyChangeListener)
public final java.lang.String setTitle(java.lang.String title)
null
if there should be no title.
title
- the title or null
if no title should be used.
public void setTitleColor(java.awt.Color color)
Default is
.
Color.BLACK
color
- the color to use for the title.public void setTitleFont(java.awt.Font font)
font
- the font to use for the title.public final IAxisTitlePainter setTitlePainter(IAxisTitlePainter titlePainter)
titlePainter
- the titlePainter to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |