|
Chart FX for Java 6.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SoftwareFX.ChartFX.Stripe
public final class Stripe
Provides access to the Stripe object.
Stripes are one of the most useful objects when it comes to highlighting information in the chart area. They allow you to highlight a range of values associated with any of the axis by drawing a color frame in the chart background. Stripes allow the user to easily pinpoint data that falls within a range of values associated with any of the axes. For example, in a scientific application you may want the user to recognize points that plot between 20 and 40 with a blue stripe object as depicted in the following figure:
Constructor Summary | |
---|---|
Stripe()
|
Method Summary | |
---|---|
int |
getAxis()
Gets the Axis. |
java.awt.Color |
getColor()
Gets the Color. |
double |
getFrom()
Gets the From. |
Link |
getLink()
Gets the Link object for a selected Stripe item. |
int |
getPoint()
Gets the Point. |
int |
getSeries()
Gets the Series. |
double |
getTo()
Gets the To. |
java.lang.String |
getURL()
Deprecated. You should use Stripe.getLink().getUrl instead. |
boolean |
isVisible()
Gets the Visible. |
void |
setAxis(int value)
Used to associate the selected Stripe with a specific chart axis. |
void |
setColor(java.awt.Color value)
Used to set the color for the selected stripe. |
void |
setFrom(double value)
Used to set the initial value for the selected stripe. |
void |
setPoint(int value)
Gets or sets a value indicating the point a Stripe is associated. |
void |
setSeries(int value)
Gets or sets a value indicating the series a Stripe is associated. |
void |
setTo(double value)
Used to set the ending value for the selected stripe. |
void |
setURL(java.lang.String value)
Deprecated. You should use Stripe.getLink().setUrl instead. |
void |
setVisible(boolean value)
Allows you to show or hide a selected chart stripe. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Stripe()
Method Detail |
---|
public int getAxis()
Gets the Axis. For more detail see setAxis(int)
.
public java.awt.Color getColor()
Gets the Color. For more detail see setColor(java.awt.Color)
.
public double getFrom()
Gets the From. For more detail see setFrom(double)
.
public Link getLink()
Gets the Link object for a selected Stripe item.
Developers may obtain the Link object for a Stripe item using this property. Using the supported Link class members, developers may configure a Link.setUrl(java.lang.String)
and Link.setTarget(java.lang.String)
for the object.
Link.setUrl(java.lang.String)
,
Link.setTarget(java.lang.String)
,
Link
public int getPoint()
Gets the Point. For more detail see setPoint(int)
.
public int getSeries()
Gets the Series. For more detail see setSeries(int)
.
public double getTo()
Gets the To. For more detail see setTo(double)
.
public java.lang.String getURL()
Stripe.getLink().getUrl
instead.
getLink()
public boolean isVisible()
Gets the Visible. For more detail see setVisible(boolean)
.
public void setAxis(int value)
Used to associate the selected Stripe with a specific chart axis.
AxisItem :
Allows Axis selection for properties needing axis assignment.Value | Description |
---|---|
AxisItem.Y | Primary Y Axis. |
AxisItem.Y2 | Secondary Y Axis. |
AxisItem.X | Primary X Axis. |
AxisItem.X2 | Secondary X Axis. |
If no axis is specified, the default axis for color stripes is Y Axis.
When assigned to any of the Y axes (left or right), the stripe will cross the chart horizontally. When assigned to any X axes, the stripe will cross the chart vertically.
The range of the stripe can be set using the setFrom(double)
and setTo(double)
properties. The color of the stripe can be set using the setColor(java.awt.Color)
property.
If you want to highlight a particular value on an axis (instead of a range) you can use the ConstantLine
Class
.
setColor(java.awt.Color)
,
setFrom(double)
,
setTo(double)
,
ConstantLine
public void setColor(java.awt.Color value)
Used to set the color for the selected stripe.
You can associate a stripe with an axis using the setAxis(int)
property.
If you want to highlight a particular value on an axis (instead of a range) you can use the ConstantLine
Class
.
For more information regarding the Color type, please refer to the Java API Documentation.
setAxis(int)
,
setFrom(double)
,
setTo(double)
,
ConstantLine
public void setFrom(double value)
Used to set the initial value for the selected stripe.
The range of the stripe (From, To) goes in strict relationship with the Axis scale that is related to, as follows:
- If the stripe is related to a numerical axis, the stripe range (From and To) is defined by doubles according to the scale values set for that particular axis.
For example creating a stripe for the Y axis is defined by two double numbers. (i.e. From = 30.5 , To = 50.75)
- If the stripe is related to a categorical axis (X axis in charts other than XY Plots), the range (From, To) is defined by integers specifying the point range you want the stripes to cover.
For example creating a stripe for the X axis is defined by two integer (Point index) numbers. (i.e. If you want to create a color stripe from point = 3 to point = 10)
The From value must be lesser than the setTo(double)
value.
You can associate a stripe to an axis using the setAxis(int)
property.
You can set the color of the stripe with the setColor(java.awt.Color)
property.
If you want to highlight a particular value on an axis (instead of a range) you can use the ConstantLine
Class
.
setAxis(int)
,
setColor(java.awt.Color)
,
setTo(double)
,
ConstantLine
public void setPoint(int value)
Gets or sets a value indicating the point a Stripe is associated.
When utilizing the Highlight feature, developers may want to associate a setSeries(int)
or Point with the Stripe. When that series or point is highlighted, the Stripe object will be highlighted as well.
You can also may also set this property equal to on of the HighlightState enumerations. Specifying Always indicates the stripe will always keep its highlighted state; Never indicates the stripe will never display a highlighted state.
setSeries(int)
public void setSeries(int value)
Gets or sets a value indicating the series a Stripe is associated.
When utilizing the Highlight feature, developers may want to associate a Series or setPoint(int)
with the Stripe. When that series or point is highlighted, the Stripe object will be highlighted as well.
You can also may also set this property equal to on of the HighlightState enumerations. Specifying Always indicates the Stripe will always keep its highlighted state; Never indicates the Stripe will never display a highlighted state.
setPoint(int)
public void setTo(double value)
Used to set the ending value for the selected stripe.
The range of the stripe (From, To) goes in strict relationship with the Axis scale that is related to, as follows:
- If the stripe is related to a numerical axis, the stripe range (From and To) is defined by doubles according to the scale values set for that particular axis.
For example creating a stripe for the Y axis is defined by two double numbers. (e.g. From = 30.5 , To = 50.75)
- If the stripe is related to a categorical axis (X axis in charts other than XY Plots), the range (From, To) is defined by integers specifying the point range you want the stripes to cover.
For example creating a stripe for the X axis is defined by two integer (Point index) numbers. (e.g. If you want to create a color stripe from point = 3 to point = 10)
The To value must be greater than the setFrom(double)
value.
You can associate a color stripe to an axis using the setAxis(int)
property.
You can set the color of the stripe with the setColor(java.awt.Color)
property.
If you want to highlight a particular value on an axis (instead of a range) you can use the ConstantLine
Class
.
setAxis(int)
,
setColor(java.awt.Color)
,
setFrom(double)
,
ConstantLine
public void setURL(java.lang.String value)
Stripe.getLink().setUrl
instead.
getLink()
public void setVisible(boolean value)
Allows you to show or hide a selected chart stripe.
This property allows you to hide a selected stripe. When you create a stripe in a chart, by default the stripe is set to be visible.
setAxis(int)
,
setColor(java.awt.Color)
,
setFrom(double)
,
setTo(double)
,
ChartCore.getStripes()
,
Chart
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |