|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.chart.RectangularRegionMarker
public class RectangularRegionMarker
A Drawable object that can be added to a Chart to mark a rectangular region. If you set the chart property, then the chart will automatically be repainted when the color or intervals of the region change.
Note that the label for a RectangularRegionMarker will always scroll when the chart is embedded in a JViewport whereas the label for a LineMarker or IntervalMarker will not scroll, but stay fixed in position relative to the marker.
Field Summary | |
---|---|
static String |
PROPERTY_AT_FRONT
The name used in a Property Change Event when the atFront property changes |
static String |
PROPERTY_CHART
The name used in a Property Change Event when the Chart property changes |
static String |
PROPERTY_COLOR
The name used in a Property Change Event when the Color property changes |
static String |
PROPERTY_LABEL
The name used in a Property Change Event when the Label property changes |
static String |
PROPERTY_LABEL_COLOR
The name used in a Property Change Event when the LabelColor property changes |
static String |
PROPERTY_LABEL_FONT
The name used in a Property Change Event when the LabelFont property changes |
static String |
PROPERTY_LABEL_PLACEMENT
The name used in a Property Change Event when the LabelPlacement property changes |
static String |
PROPERTY_OUTLINE_COLOR
The name of the property used for the outline color |
static String |
PROPERTY_OUTLINE_STROKE
The name of the property used for the outline |
static String |
PROPERTY_PAINT
The name used in a Property Change Event when the Paint property changes |
static String |
PROPERTY_VISIBLE
The name used in a Property Change Event when the Visible property changes. |
static String |
PROPERTY_X_INTERVAL
The name used in a Property Change Event when the XInterval property changes |
static String |
PROPERTY_Y_INTERVAL
The name used in a Property Change Event when the YInterval property changes |
protected PropertyChangeSupport |
support
|
Constructor Summary | |
---|---|
RectangularRegionMarker()
Zero argument constructor. |
|
RectangularRegionMarker(Chart chart)
Create a marker and set the Chart object to which this marker applies |
|
RectangularRegionMarker(Chart chart,
double xMin,
double xMax,
double yMin,
double yMax,
Paint paint)
Create a rectangular marker and set all properties |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds an object that is interested in property changes in this object |
void |
draw(Graphics g)
The callback method to draw the object. |
Chart |
getChart()
Returns the chart with which this marker is associated |
Color |
getColor()
Returns the color of the marker object. |
String |
getLabel()
Returns the label used on this marker, if any. |
Color |
getLabelColor()
Returns the current color setting for the label |
Font |
getLabelFont()
Returns the font of the label |
LabelPlacement |
getLabelPlacement()
Returns the current position of the label |
Color |
getOutlineColor()
Returns the outline color for the rectangular region, or null if not used |
Stroke |
getOutlineStroke()
The stroke currently used for painting the outline of the rectangle |
Paint |
getPaint()
Returns the paint used for the marker object |
NumericRange |
getXInterval()
Returns the x interval of the marker |
NumericRange |
getYInterval()
Returns the y interval of the marker |
int |
getZOrder()
|
boolean |
isAtFront()
A method of the Frontable interface. |
boolean |
isVisible()
Returns whether this marker object is currently visible |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a previously added listener |
void |
setAtFront(boolean atFront)
Specify whether the marker should be drawn in front of the chart models |
void |
setChart(Chart chart)
Set the chart that this object will update if any of the properties change |
void |
setColor(Color color)
Specify the color of the marker object |
void |
setLabel(String label)
Specify a text label for the marker. |
void |
setLabelColor(Color labelColor)
Specify the color to use for the label. |
void |
setLabelFont(Font labelFont)
Specify the font used for displaying the label [optional] |
void |
setLabelPlacement(LabelPlacement labelPlacement)
Specify where to place the label, if one has been provided |
void |
setOutlineColor(Color outlineColor)
Specify the outline color for the rectangular region, or null if not used |
void |
setOutlineStroke(Stroke outlineStroke)
Specify the stroke to use for the outline of the rectangular region. |
void |
setPaint(Paint paint)
Specify the paint to use for the marker object. |
void |
setRenderingHint(RenderingHints.Key hint,
Object value)
|
void |
setVisible(boolean visible)
Specify whether this marker object should be drawn. |
void |
setXInterval(double min,
double max)
Specifies the upper and lower bounds of the rectangular region on the x axis |
void |
setYInterval(double min,
double max)
Specifies the upper and lower bounds of the rectangular region on the y axis |
void |
setZOrder(int zOrder)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_AT_FRONT
public static final String PROPERTY_VISIBLE
public static final String PROPERTY_COLOR
public static final String PROPERTY_PAINT
public static final String PROPERTY_CHART
public static final String PROPERTY_X_INTERVAL
public static final String PROPERTY_Y_INTERVAL
public static final String PROPERTY_LABEL
public static final String PROPERTY_LABEL_PLACEMENT
public static final String PROPERTY_LABEL_COLOR
public static final String PROPERTY_LABEL_FONT
public static final String PROPERTY_OUTLINE_COLOR
public static final String PROPERTY_OUTLINE_STROKE
protected final PropertyChangeSupport support
Constructor Detail |
---|
public RectangularRegionMarker()
public RectangularRegionMarker(Chart chart)
chart
- the chart object to which this marker applies.public RectangularRegionMarker(Chart chart, double xMin, double xMax, double yMin, double yMax, Paint paint)
chart
- the chart to which this marker appliesxMin
- the minimum x value for the regionxMax
- the maximum x value for the regionyMin
- the minimum y value for the regionyMax
- the maximum y value for the regionpaint
- the color or other paint for the regionMethod Detail |
---|
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- the interested objectpublic void removePropertyChangeListener(PropertyChangeListener listener)
listener
- the listener to removepublic Chart getChart()
public void setChart(Chart chart)
chart
- the Chart objectpublic void setRenderingHint(RenderingHints.Key hint, Object value)
public boolean isVisible()
public void setVisible(boolean visible)
visible
- whether the marker should be drawnpublic Color getColor()
public void setColor(Color color)
color
- the new colorpublic Paint getPaint()
public void setPaint(Paint paint)
paint
- the new paint.public NumericRange getXInterval()
public NumericRange getYInterval()
public void setXInterval(double min, double max)
min
- the minimum x valuemax
- the maximum x valuepublic void setYInterval(double min, double max)
min
- the minimum y valuemax
- the maximum y valuepublic String getLabel()
public void setLabel(String label)
public LabelPlacement getLabelPlacement()
public void setLabelPlacement(LabelPlacement labelPlacement)
labelPlacement
- where to place the labelpublic Color getLabelColor()
public void setLabelColor(Color labelColor)
labelColor
- the color to use for the labelpublic Font getLabelFont()
public void setLabelFont(Font labelFont)
labelFont
- the font for the labelpublic Color getOutlineColor()
public int getZOrder()
getZOrder
in interface ZOrder
public void setZOrder(int zOrder)
setZOrder
in interface ZOrder
public void setOutlineColor(Color outlineColor)
outlineColor
- the new outline colorpublic Stroke getOutlineStroke()
public void setOutlineStroke(Stroke outlineStroke)
outlineStroke
- the outline strokepublic void draw(Graphics g)
draw
in interface Drawable
g
- the Graphics contextpublic boolean isAtFront()
Frontable
interface. By default returns false so the filling is drawn behind any lines.
isAtFront
in interface Frontable
public void setAtFront(boolean atFront)
setAtFront
in interface Frontable
atFront
- whether the object is to be shown in front of ChartModels.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |