public class CategoryMarker extends AbstractMarker implements java.io.Serializable
CategoryAxis3D. This marker could be
used to highlight one selected category.
CategoryMarkerDemo1.java.
DEFAULT_FILL_COLOR, DEFAULT_LABEL_COLOR, DEFAULT_LINE_COLOR, DEFAULT_LINE_STROKE, DEFAULT_MARKER_FONT| Constructor and Description |
|---|
CategoryMarker(java.lang.Comparable<?> category)
Creates a marker for the specified category.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(java.awt.Graphics2D g2,
MarkerData markerData,
boolean reverse)
Handles drawing of the marker.
|
boolean |
equals(java.lang.Object obj) |
java.lang.Comparable<?> |
getCategory()
Returns the category.
|
java.awt.Color |
getFillColor()
Returns the color used to fill the marker band.
|
java.awt.Font |
getFont()
Returns the font for the label.
|
java.lang.String |
getLabel()
Returns the label for the marker (if this is
null then no
label is displayed). |
Anchor2D |
getLabelAnchor()
Returns the anchor for the label.
|
java.awt.Color |
getLabelColor()
Returns the label color.
|
java.awt.Color |
getLineColor()
Returns the line color for the marker.
|
java.awt.Stroke |
getLineStroke()
Returns the line stroke.
|
CategoryMarkerType |
getType()
Returns the marker type which determines whether the marker is drawn
as a band (the default) or a line.
|
int |
hashCode() |
void |
setCategory(java.lang.Comparable<?> category)
Sets the category for the marker and sends a change event to all
registered listeners.
|
void |
setFillColor(java.awt.Color color)
Sets the color used to fill the marker band and sends a change event
to all registered listeners.
|
void |
setFont(java.awt.Font font)
Sets the font for the marker label and sends a change event to all
registered listeners.
|
void |
setLabel(java.lang.String label)
Sets the label and sends a change event to all registered listeners.
|
void |
setLabelAnchor(Anchor2D anchor)
Sets the anchor for the label and sends a change event to all registered
listeners.
|
void |
setLabelColor(java.awt.Color color)
Sets the label color and sends a change event to all registered
listeners.
|
void |
setLineColor(java.awt.Color color)
Sets the line color for the marker and sends a change event to all
registered listeners.
|
void |
setLineStroke(java.awt.Stroke stroke)
Sets the line stroke and sends a change event to all registered
listeners.
|
void |
setType(CategoryMarkerType type)
Sets the marker type and sends a change event to all registered
listeners.
|
addChangeListener, deriveTextAnchor, deriveTextAnchorForLine, drawMarkerLabel, drawMarkerLabel, fireChangeEvent, receive, removeChangeListenerpublic CategoryMarker(java.lang.Comparable<?> category)
category - the category key (null not permitted).public java.lang.Comparable<?> getCategory()
null).public void setCategory(java.lang.Comparable<?> category)
category - the new category (null not permitted).public CategoryMarkerType getType()
null).public void setType(CategoryMarkerType type)
type - the type (null not permitted).public java.lang.String getLabel()
null then no
label is displayed).null).public void setLabel(java.lang.String label)
label - the label (null permitted).public java.awt.Font getFont()
Marker.DEFAULT_MARKER_FONT.null).public void setFont(java.awt.Font font)
font - the font (null not permitted).public java.awt.Color getLabelColor()
Marker.DEFAULT_LABEL_COLOR.null).public void setLabelColor(java.awt.Color color)
color - the color (null not permitted).public Anchor2D getLabelAnchor()
Anchor2D.CENTER.public void setLabelAnchor(Anchor2D anchor)
anchor - the anchor (null not permitted).public java.awt.Color getLineColor()
null).public void setLineColor(java.awt.Color color)
color - the color (null not permitted).public java.awt.Stroke getLineStroke()
Marker.DEFAULT_LINE_STROKE.null).public void setLineStroke(java.awt.Stroke stroke)
stroke - the stroke (null not permitted).public java.awt.Color getFillColor()
null).public void setFillColor(java.awt.Color color)
color - the color (null not permitted).public void draw(java.awt.Graphics2D g2, MarkerData markerData, boolean reverse)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object