|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.plugins.AbstractChartPlugin<Chart2D>
lt.monarch.chart.plugins.MarkerValuePlugin
public class MarkerValuePlugin extends AbstractChartPlugin<Chart2D> implements java.awt.event.MouseMotionListener, java.awt.event.MouseListener
Plug-in for Chart2D axis, which implements line value markers showing
| Modifier and Type | Class and Description |
|---|---|
static interface |
MarkerValuePlugin.ValueChangeListener
|
| Constructor and Description |
|---|
MarkerValuePlugin(Axis2D axis)
Constructs a new MarkerValuePlugin for the specified axis. |
MarkerValuePlugin(Axis2D axis,
Point2D markerLocation,
boolean onlyFollowDrag)
Constructs a new MarkerValuePlugin for the specified axis. |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Prepares the plug-in, when it is installed. |
void |
addListener(MarkerValuePlugin.ValueChangeListener listener)
Registers a value change listener |
void |
deactivate()
Cleanups the plug-in, when it is uninstalled. |
protected void |
fireMarkerPositionChanged(double projectedLevel)
Forwards the given notification event to all ValueChangeListener objects that
registered themselves as listeners for this chart plugin. |
Marker |
getMarker()
|
MarkerLine |
getMarkerLine()
|
double |
getRotationAngle()
Returns rotation angle (in radians) of marker. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
paint(AbstractGraphics g)
Does nothing- must be overridden in extending classes. |
void |
removeListener(MarkerValuePlugin.ValueChangeListener listener)
Unregisters a value change listener |
void |
setMarker(Marker marker)
Sets marker. |
void |
setMarkerLine(MarkerLine markerLine)
Sets marker line to the plugin. |
void |
setRotationAngle(double rotationAngle)
Sets rotation angle of marker. |
| 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 MarkerValuePlugin(Axis2D axis)
MarkerValuePlugin for the specified axis.
axis - Axis to which the marker and marker line will be attached.
public MarkerValuePlugin(Axis2D axis,
Point2D markerLocation,
boolean onlyFollowDrag)
MarkerValuePlugin for the specified axis.
axis - Axis to which the marker and marker line will be attached.markerLocation - starting marker location in normalized range.onlyFollowDrag - should the marker be translated when it is dragged or when chart is pressed where it could be located.| Method Detail |
|---|
public void addListener(MarkerValuePlugin.ValueChangeListener listener)
listener - value change listenerpublic void removeListener(MarkerValuePlugin.ValueChangeListener listener)
listener - value change listenerpublic void activate()
AbstractChartPlugin
activate in class AbstractChartPlugin<Chart2D>public void deactivate()
AbstractChartPlugin
deactivate in class AbstractChartPlugin<Chart2D>public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void paint(AbstractGraphics g)
AbstractChartPlugin
paint in interface ChartPlugin<Chart2D>paint in class AbstractChartPlugin<Chart2D>g - the Graphics context in which chart is paintedChartPlugin.paint(lt.monarch.chart.engine.AbstractGraphics)public double getRotationAngle()
public void setRotationAngle(double rotationAngle)
rotationAngle - Rotation angle of markerpublic MarkerLine getMarkerLine()
public void setMarkerLine(MarkerLine markerLine)
markerLine - public Marker getMarker()
public void setMarker(Marker marker)
marker - protected void fireMarkerPositionChanged(double projectedLevel)
ValueChangeListener objects that
registered themselves as listeners for this chart plugin.
event - the event to be forwarded
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||