|
Chart FX 7 for Java Desktop | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwarefx.chartfx.desktop.Line
public class Line
Provides access to the Line object.
Using these properties you can set the color, width and style of many line objects including Axis
, GridLine
and CustomGridLine
.
Members also allow for shapes to be applied to all the supported line objects. This allows for interesting design ideas such as an Axis representing a thermometer.
Constructor Summary | |
---|---|
Line()
|
Method Summary | |
---|---|
Color |
getColor()
Gets the Color. |
com.softwarefx.LineCap |
getEndCap()
Gets the EndCap. |
com.softwarefx.LineCap |
getStartCap()
Gets the StartCap. |
com.softwarefx.DashStyle |
getStyle()
Gets the Style. |
int |
getWidth()
Gets the Width. |
void |
setColor(Color value)
Sets or Gets the line color for a selected line. |
void |
setEndCap(com.softwarefx.LineCap value)
Sets a marker shape at the end of a selected line. |
void |
setStartCap(com.softwarefx.LineCap value)
Sets a marker shape at the beginning of a selected line. |
void |
setStyle(com.softwarefx.DashStyle value)
Sets the line style for a selected line. |
void |
setWidth(int value)
Sets the line width for a selected line. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Line()
Method Detail |
---|
public Color getColor()
Gets the Color. For more detail see setColor(java.awt.Color)
.
public com.softwarefx.LineCap getEndCap()
Gets the EndCap. For more detail see setEndCap(com.softwarefx.LineCap)
.
public com.softwarefx.LineCap getStartCap()
Gets the StartCap. For more detail see setStartCap(com.softwarefx.LineCap)
.
public com.softwarefx.DashStyle getStyle()
Gets the Style. For more detail see setStyle(com.softwarefx.DashStyle)
.
public int getWidth()
Gets the Width. For more detail see setWidth(int)
.
public void setColor(Color value)
Sets or Gets the line color for a selected line.
When this property is applied to an axis line, both the primary and secondary axes are affected. For instance, when you change the X axis line color using this property, both axes lines above and below the chart area will be colored.
You may also control the setWidth(int)
and setStyle(com.softwarefx.DashStyle)
of the selected line using the supported members of the Line
Class
.
The setEndCap(com.softwarefx.LineCap)
and setStartCap(com.softwarefx.LineCap)
properties allow you to configured various shapes at the beginning and ending of a selected line.
For more information regarding the Color type, please refer to the Java API Documentation.
Named color are supported (e.g. Red), to use Hex notation you have to use quotes (e.g. "#FF00FF").
Below, the X axis line color is set to red:
setEndCap(com.softwarefx.LineCap)
,
setStartCap(com.softwarefx.LineCap)
,
setStyle(com.softwarefx.DashStyle)
,
setWidth(int)
,
Chart.getAxisY()
,
Chart.getAxisX()
,
Chart
,
Axis
,
GridLine
public void setEndCap(com.softwarefx.LineCap value)
Sets a marker shape at the end of a selected line.
When this property is applied to an axis line, both the primary and secondary axes are affected. For instance, when you change the X axis EndCap using this property, both axes lines above and below the chart area will be modified.
A starting marker shape may be applied to lines using the setStartCap(com.softwarefx.LineCap)
property.
You can also control setColor(java.awt.Color)
, setStyle(com.softwarefx.DashStyle)
and setWidth(int)
for a selected line object using the supported members of the Line
Class
.
These are the supported styles:
AnchorMask
ArrowAnchor
Custom
DiamondAnchor
Flat
NoAnchor
Round
RoundAnchor
Square
SquareAnchor
Triangle
Below, the X axis line EndCap is set to RoundAnchor:
setStartCap(com.softwarefx.LineCap)
,
setColor(java.awt.Color)
,
setStyle(com.softwarefx.DashStyle)
,
setWidth(int)
,
Chart.getAxisX()
,
Chart.getAxisY()
,
Chart
,
Axis
,
GridLine
public void setStartCap(com.softwarefx.LineCap value)
Sets a marker shape at the beginning of a selected line.
When this property is applied to an axis line, both the primary and secondary axes are affected. For instance, when you change the X axis StartCap using this property, both axes lines above and below the chart area will be modified.
An ending marker shape may be applied to lines using the setEndCap(com.softwarefx.LineCap)
property.
You can also control setColor(java.awt.Color)
, setStyle(com.softwarefx.DashStyle)
and setWidth(int)
for a selected line object using the supported members of the Line
Class
.
These are the supported styles:
AnchorMask
ArrowAnchor
Custom
DiamondAnchor
Flat
NoAnchor
Round
RoundAnchor
Square
SquareAnchor
Triangle
Below, the X axis line StartCap is set to RoundAnchor:
setEndCap(com.softwarefx.LineCap)
,
setColor(java.awt.Color)
,
setStyle(com.softwarefx.DashStyle)
,
setWidth(int)
,
Chart.getAxisX()
,
Chart.getAxisY()
,
Chart
,
Axis
,
GridLine
public void setStyle(com.softwarefx.DashStyle value)
Sets the line style for a selected line.
When this property is applied to an axis line, both the primary and secondary axes are affected. For instance, when you change the X axis line style using this property, both axes lines above and below the chart area will be affected.
You may also control the setWidth(int)
and setColor(java.awt.Color)
of the selected line using the supported members of the Line
Class
.
The setEndCap(com.softwarefx.LineCap)
and setStartCap(com.softwarefx.LineCap)
properties allow you to configured various shapes at the beginning and ending of a selected line.
These are the supported DashStyles:
Custom
Dash
DashDot
DashDotDot
Dot
Solid
The image below depicts a 'Dot' Line style assigned to the Y axis:
For more information regarding the Drawing type, please refer to the Java API Documentation.
setEndCap(com.softwarefx.LineCap)
,
setStartCap(com.softwarefx.LineCap)
,
setColor(java.awt.Color)
,
setWidth(int)
,
Chart.getAxisY()
,
Chart.getAxisX()
,
Chart
,
Axis
,
GridLine
public void setWidth(int value)
Sets the line width for a selected line.
When this property is applied to an axis line, both the primary and secondary axes are affected. For instance, when you change the X axis line width using this property, both axes lines above and below the chart area will be affected.
You may also control the setStyle(com.softwarefx.DashStyle)
and setColor(java.awt.Color)
of the selected line using the supported members of the Line
Class
.
The setEndCap(com.softwarefx.LineCap)
and setStartCap(com.softwarefx.LineCap)
properties allow you to configured various shapes at the beginning and end of a selected line.
Below, the X axis line width is set to 3:
setEndCap(com.softwarefx.LineCap)
,
setStartCap(com.softwarefx.LineCap)
,
setStyle(com.softwarefx.DashStyle)
,
setColor(java.awt.Color)
,
Chart.getAxisY()
,
Chart.getAxisX()
,
Chart
,
Axis
,
GridLine
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |