|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinfo.monitorenter.gui.chart.axistitlepainters.AxisTitlePainterDefault
public class AxisTitlePainterDefault
An implementation that will render
titles in a default way while adapting to x or y axis use
IAxisTitlePainter
For x axis the title will be displayed centered below the axis. For y axis the title will be displayed rotated by 90 degrees centered left of the axis.
| Field Summary |
|---|
| Fields inherited from interface info.monitorenter.gui.chart.IAxisTitlePainter |
|---|
PROPERTY_TITLEFONT |
| Constructor Summary | |
|---|---|
AxisTitlePainterDefault()
Defcon. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Add a listener for the given property. |
int |
getHeight(IAxis axis,
Graphics2D g2d)
Returns the height of this axis title in px with respect to the current title of the given axis. |
PropertyChangeListener[] |
getPropertyChangeListeners(String propertyName)
Returns an array of all the listeners that were added to the this instance with IAxisTitlePainter.addPropertyChangeListener(String, PropertyChangeListener). |
Font |
getTitleFont()
Returns the font used for painting the title or null if not configured. |
int |
getWidth(IAxis axis,
Graphics2D g2d)
Returns the width of this axis title in px with respect to the current title of the given axis. |
void |
paintTitle(IAxis axis,
Graphics2D g)
Invoked to let implementations paint the given title of the given axis. |
void |
removePropertyChangeListener(String property,
PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. |
void |
setTitleFont(Font titleFont)
Sets the title font to use. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AxisTitlePainterDefault()
| Method Detail |
|---|
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
IAxisTitlePainter
The following types should be fired to
listeners:PropertyChangeEvent
getPropertyName() |
getSource() |
getOldValue() |
getNewValue() |
|---|---|---|---|
|
that changed |
, the old value. |
, the new value. |
addPropertyChangeListener in interface IAxisTitlePainterpropertyName - the property to be informed about changes.listener - the listener that will be informed.IAxisTitlePainter.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
IAxisTitlePainterIAxisTitlePainter.addPropertyChangeListener(String, PropertyChangeListener).
getPropertyChangeListeners in interface IAxisTitlePainterpropertyName - The name of the property being listened to.
IAxisTitlePainter.addPropertyChangeListener(String, PropertyChangeListener).IAxisTitlePainter.getPropertyChangeListeners(java.lang.String)
public void removePropertyChangeListener(String property,
PropertyChangeListener listener)
IAxisTitlePainterlistener 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.
removePropertyChangeListener in interface IAxisTitlePainterproperty - The name of the property that was listened on.listener - The PropertyChangeListener to be removed.IAxisTitlePainter.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
public int getHeight(IAxis axis,
Graphics2D g2d)
IAxisTitlePainter
getHeight in interface IAxisTitlePainteraxis - the instance this title painter is working for.g2d - needed for size informations (e.g. font widths).
IAxisTitlePainter.getHeight(info.monitorenter.gui.chart.IAxis,
java.awt.Graphics2D)public final Font getTitleFont()
IAxisTitlePainter
getTitleFont in interface IAxisTitlePainterIAxisTitlePainter.getTitleFont()
public int getWidth(IAxis axis,
Graphics2D g2d)
IAxisTitlePainter
getWidth in interface IAxisTitlePainteraxis - the instance this title painter is working for.g2d - needed for size informations (e.g. font widths).
IAxisTitlePainter.getWidth(info.monitorenter.gui.chart.IAxis,
java.awt.Graphics2D)
public void paintTitle(IAxis axis,
Graphics2D g)
IAxisTitlePainterImplementations should make use of the information about the axis coordinates (start pixel,end pixel) and the graphics context (for font dimensions) to do it right.
paintTitle in interface IAxisTitlePainteraxis - the axis to paint the title of, needed e.g. to IAxis.getTitle().g - needed for size informations.IAxisTitlePainter.paintTitle(info.monitorenter.gui.chart.IAxis,
java.awt.Graphics2D)public final void setTitleFont(Font titleFont)
IAxisTitlePainter
setTitleFont in interface IAxisTitlePaintertitleFont - the font to use for the title.IAxisTitlePainter.setTitleFont(java.awt.Font)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||