|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.plugins.AbstractChartPlugin<AbstractChart<?,?>>
lt.monarch.chart.plugins.AxisMarker
public class AxisMarker extends AbstractChartPlugin<AbstractChart<?,?>> implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
Plug-in for 2D charts, which implements axis markers.
| Constructor and Description |
|---|
AxisMarker(Axis2D axisX,
Axis2D axisY)
Constructs a new AxisMarker for the specified axes. |
AxisMarker(Axis2D axisX,
Axis2D axisY,
java.awt.Color markerColor,
java.awt.Color labelColor,
int size,
AxisLabelPaint xAxisTextPaintingMode,
AxisLabelPaint yAxisTextPaintingMode,
int numbersPrecision)
Constructs a new AxisMarker for the specified axes with the specified
attributes. |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activates the chart plug-in. |
void |
deactivate()
Deactivates the chart plug-in. |
void |
drawMarkers(AbstractGraphics g,
java.awt.Point point)
Paints the axis markers and value labels at the the intersection with the specified point. |
java.awt.Color |
getLabelColor()
Returns the current value label color. |
java.util.Locale |
getLocale()
Returns the current locale of the value labels. |
java.awt.Color |
getMarkerColor()
Returns the current marker toFill color. |
int |
getMarkerSize()
Returns current marker size. |
int |
getNumberPrecision()
Returns the current number precision of the value labels. |
void |
mouseClicked(java.awt.event.MouseEvent me)
Invoked when a mouse button has been clicked on a chart. |
void |
mouseDragged(java.awt.event.MouseEvent me)
Invoked when a mouse button is pressed on a chart and then dragged. |
void |
mouseEntered(java.awt.event.MouseEvent me)
Invoked when the mouse enters a chart. |
void |
mouseExited(java.awt.event.MouseEvent me)
Invoked when the mouse exits a chart. |
void |
mouseMoved(java.awt.event.MouseEvent me)
Invoked when the mouse button has been moved on a chart (with no buttons no down). |
void |
mousePressed(java.awt.event.MouseEvent me)
Invoked when a mouse button has been pressed on a chart. |
void |
mouseReleased(java.awt.event.MouseEvent me)
Invoked when a mouse button has been released. |
void |
paint(AbstractGraphics g)
If needed, paints axis markers at the intersection with the mouse pointer points. |
void |
setLabelColor(java.awt.Color color)
Sets the value label color. |
void |
setLocale(java.util.Locale locale)
Sets the locale for the value labels. |
void |
setMarkerColor(java.awt.Color color)
Sets the marker toFill color. |
void |
setMarkerSize(int size)
Sets the marker size. |
void |
setNumberPrecision(int precision)
Sets number precision for the value labels. |
| Methods inherited from class lt.monarch.chart.plugins.AbstractChartPlugin |
|---|
adjustChart, chart, getChart, install, isActivated, uninstall |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AxisMarker(Axis2D axisX,
Axis2D axisY)
AxisMarker for the specified axes.
axisX - the X axisaxisY - the Y axis
public AxisMarker(Axis2D axisX,
Axis2D axisY,
java.awt.Color markerColor,
java.awt.Color labelColor,
int size,
AxisLabelPaint xAxisTextPaintingMode,
AxisLabelPaint yAxisTextPaintingMode,
int numbersPrecision)
AxisMarker for the specified axes with the specified
attributes.
axisX - the X axisaxisY - the Y axismarkerColor - color of the markerlabelColor - color of the value labelssize - the marker sizexAxisTextPaintingMode - the value label on X axis painting mode; should be one of:
HORIZONTAL_TEXT and VERTICAL_TEXTyAxisTextPaintingMode - the value label on Y axis painting mode; should be one of:
HORIZONTAL_TEXT and VERTICAL_TEXTnumbersPrecision - the precision of numeric values displayed as labels| Method Detail |
|---|
public void activate()
activate in class AbstractChartPlugin<AbstractChart<?,?>>public void deactivate()
deactivate in class AbstractChartPlugin<AbstractChart<?,?>>public void setMarkerSize(int size)
size - the new size of markerpublic int getMarkerSize()
public void setMarkerColor(java.awt.Color color)
color - the new marker toFill colorpublic java.awt.Color getMarkerColor()
public void setLabelColor(java.awt.Color color)
color - the new value label colorpublic java.awt.Color getLabelColor()
public void setNumberPrecision(int precision)
precision - the new number precisionpublic int getNumberPrecision()
public void setLocale(java.util.Locale locale)
locale - the new localepublic java.util.Locale getLocale()
public void mousePressed(java.awt.event.MouseEvent me)
me.getModifiers() ==
java.awt.event.InputEvent.BUTTON3_MASK, paints the axes markers and value labels at
the intersection with the mouse pointer points.
mousePressed in interface java.awt.event.MouseListenerme - mouse eventpublic void mouseReleased(java.awt.event.MouseEvent me)
mouseReleased in interface java.awt.event.MouseListenerme - mouse eventpublic void mouseClicked(java.awt.event.MouseEvent me)
mouseClicked in interface java.awt.event.MouseListenerme - mouse eventpublic void mouseEntered(java.awt.event.MouseEvent me)
mouseEntered in interface java.awt.event.MouseListenerme - mouse eventpublic void mouseExited(java.awt.event.MouseEvent me)
mouseExited in interface java.awt.event.MouseListenerme - mouse eventpublic void mouseDragged(java.awt.event.MouseEvent me)
me.getModifiers() ==
java.awt.event.InputEvent.BUTTON3_MASK, then paints the axes markers and value
labels at the intersection with the mouse pointer points.
mouseDragged in interface java.awt.event.MouseMotionListenerme - mouse eventpublic void mouseMoved(java.awt.event.MouseEvent me)
mouseMoved in interface java.awt.event.MouseMotionListenerme - mouse event
public void drawMarkers(AbstractGraphics g,
java.awt.Point point)
g - the Graphics context in which to paint axis markerspoint - the pointpublic void paint(AbstractGraphics g)
paint in interface ChartPlugin<AbstractChart<?,?>>paint in class AbstractChartPlugin<AbstractChart<?,?>>g - the Graphics context in which to paint axis markersChartPlugin.paint(lt.monarch.chart.engine.AbstractGraphics)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||