public abstract class AbstractMarker extends java.lang.Object implements Marker
DEFAULT_FILL_COLOR, DEFAULT_LABEL_COLOR, DEFAULT_LINE_COLOR, DEFAULT_LINE_STROKE, DEFAULT_MARKER_FONT| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(MarkerChangeListener listener)
Registers a listener to receive notification of changes to the marker.
|
protected static TextAnchor |
deriveTextAnchor(RefPt2D refPt,
boolean vflip)
A utility method that returns a suitable text anchor for a given
reference point.
|
protected static TextAnchor |
deriveTextAnchorForLine(RefPt2D refPt,
boolean vflip)
A utility method that returns a suitable text anchor for a given
reference point relative to a line (rather than a rectangle which is
the normal case).
|
protected void |
drawMarkerLabel(java.awt.Graphics2D g2,
java.lang.String label,
double x,
double y,
Anchor2D anchor,
java.awt.geom.Line2D refLine,
boolean reverse)
Draws a marker label.
|
protected void |
drawMarkerLabel(java.awt.Graphics2D g2,
java.lang.String label,
double x,
double y,
Anchor2D anchor,
java.awt.geom.Line2D refLine1,
java.awt.geom.Line2D refLine2,
boolean reverse)
Draws a marker label.
|
protected void |
fireChangeEvent()
Sends a
MarkerChangeEvent to all registered listeners. |
void |
receive(ChartElementVisitor visitor)
Receives a visitor.
|
void |
removeChangeListener(MarkerChangeListener listener)
Deregisters a listener so that it no longer receives notification of
changes to the marker.
|
protected void drawMarkerLabel(java.awt.Graphics2D g2, java.lang.String label, double x, double y, Anchor2D anchor, java.awt.geom.Line2D refLine, boolean reverse)
g2 - the graphics target (null not permitted).label - the label.x - the x-coordinate for the anchor point.y - the y-cpordinate for the anchor point.anchor - the label anchor (null not permitted).refLine - a reference line that is used to determine the rotation
angle for the label (null not permitted).reverse - a flag to indicate reverse orientation.protected void drawMarkerLabel(java.awt.Graphics2D g2, java.lang.String label, double x, double y, Anchor2D anchor, java.awt.geom.Line2D refLine1, java.awt.geom.Line2D refLine2, boolean reverse)
g2 - the graphics target (null not permitted).label - the label.x - the x-coordinate for the anchor point.y - the y-cpordinate for the anchor point.anchor - the label anchor (null not permitted).refLine1 - a reference line that is used to determine the rotation
angle for the label (null not permitted).refLine2 - a reference line that is used to determine the rotation
angle for the label (null not permitted).reverse - a flag to indicate reverse orientation.public void receive(ChartElementVisitor visitor)
receive in interface ChartElementvisitor - the visitor.public void addChangeListener(MarkerChangeListener listener)
addChangeListener in interface Markerlistener - the listener (null not permitted).public void removeChangeListener(MarkerChangeListener listener)
removeChangeListener in interface Markerlistener - the listener (null not permitted).protected void fireChangeEvent()
MarkerChangeEvent to all registered listeners.protected static TextAnchor deriveTextAnchor(RefPt2D refPt, boolean vflip)
refPt - the reference point (null not permitted).vflip - is the text flipped vertically?null).protected static TextAnchor deriveTextAnchorForLine(RefPt2D refPt, boolean vflip)
refPt - the reference point (null not permitted).vflip - is the text flipped vertically?null).