|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.StrokeLineStyle
public class StrokeLineStyle
Attributes that affect the appearance of lines. The StrokeLineStyle class encapsulates the set of user specifiable properties pertaining to chart lines. Attributes included are: color, visibility, line style (stroke).
BarChart barChart = getMyBarChart(); StrokeLineStyle axisLine = ((barChart.getBarChartModel()).getCategoryAxisModel()).getAxisLineStyle(); axisLine.setColor(Color.blue.darker());
GraphStyle
,
ModelBase
Field Summary | |
---|---|
static java.lang.String |
RB_KEY
|
static ConstantCollection |
SASGRAPH_LINE
SASGRAPH_LINE enables a set of static actions associated with the public SASGRAPH_LINE constants. |
static int |
SASGRAPH_LINE_UNRECOGNIZED
Invalid |
static int |
SASGRAPH_LINE01
produces SAS/Graph line style #1, SOLID |
static int |
SASGRAPH_LINE02
produces SAS/Graph line style #2, DASH1 |
static int |
SASGRAPH_LINE03
produces SAS/Graph line style #3, DASH2 |
static int |
SASGRAPH_LINE04
produces SAS/Graph line style #4, DASH3 |
static int |
SASGRAPH_LINE05
produces SAS/Graph line style #5, DASH4 |
static int |
SASGRAPH_LINE06
produces SAS/Graph line style #6, DASH5 |
static int |
SASGRAPH_LINE07
produces SAS/Graph line style #7, DASH6 |
static int |
SASGRAPH_LINE08
produces SAS/Graph line style #8, DASH3DASH1 |
static int |
SASGRAPH_LINE09
produces SAS/Graph line style #9, DASH4DASH1 |
static int |
SASGRAPH_LINE10
produces SAS/Graph line style #10, DASH5DASH1 |
static int |
SASGRAPH_LINE11
produces SAS/Graph line style #11, DASH6DASH1 |
static int |
SASGRAPH_LINE12
produces SAS/Graph line style #12, DASH5DASH3 |
static int |
SASGRAPH_LINE13
produces SAS/Graph line style #13, DASH6DASH3 |
static int |
SASGRAPH_LINE14
produces SAS/Graph line style #14, DASH3DASH1DASH1 |
static int |
SASGRAPH_LINE15
produces SAS/Graph line style #15, DASH4DASH1DASH1 |
static int |
SASGRAPH_LINE16
produces SAS/Graph line style #16, DASH5DASH1DASH1 |
static int |
SASGRAPH_LINE17
produces SAS/Graph line style #17, DASH6DASH1DASH1 |
static int |
SASGRAPH_LINE18
produces SAS/Graph line style #18, DASH5DASH3DASH3 |
static int |
SASGRAPH_LINE19
produces SAS/Graph line style #19, DASH6DASH3DASH3 |
static int |
SASGRAPH_LINE20
produces SAS/Graph line style #20, DASH2SPACE |
static int |
SASGRAPH_LINE21
produces SAS/Graph line style #21, DASH3SPACE |
static int |
SASGRAPH_LINE22
produces SAS/Graph line style #22, DASH4SPACE |
static int |
SASGRAPH_LINE23
produces SAS/Graph line style #23, DASH5SPACE |
static int |
SASGRAPH_LINE24
produces SAS/Graph line style #24, DASH6SPACE |
static int |
SASGRAPH_LINE25
produces SAS/Graph line style #25, DASH3DASH2 |
static int |
SASGRAPH_LINE26
produces SAS/Graph line style #26, DASH4DASH2 |
static int |
SASGRAPH_LINE27
produces SAS/Graph line style #27, DASH5DASH2 |
static int |
SASGRAPH_LINE28
produces SAS/Graph line style #28, DASH6DASH2 |
static int |
SASGRAPH_LINE29
produces SAS/Graph line style #29, DASH3DASH2DASH2 |
static int |
SASGRAPH_LINE30
produces SAS/Graph line style #30, DASH4DASH2DASH2 |
static int |
SASGRAPH_LINE31
produces SAS/Graph line style #31, DASH5DASH2DASH2 |
static int |
SASGRAPH_LINE32
produces SAS/Graph line style #32, DASH6DASH2DASH2 |
static int |
SASGRAPH_LINE33
produces SAS/Graph line style #33, DOT1 |
static int |
SASGRAPH_LINE34
produces SAS/Graph line style #34, DOT1SPACE |
static int |
SASGRAPH_LINE35
produces SAS/Graph line style #35, DOT1SPACE2 |
static int |
SASGRAPH_LINE36
produces SAS/Graph line style #36, DOT2 |
static int |
SASGRAPH_LINE37
produces SAS/Graph line style #37, DOT3 |
static int |
SASGRAPH_LINE38
produces SAS/Graph line style #38, DOT2DOT1 |
static int |
SASGRAPH_LINE39
produces SAS/Graph line style #39, DOT3DOT1 |
static int |
SASGRAPH_LINE40
produces SAS/Graph line style #40, DOT3DOT2 |
static int |
SASGRAPH_LINE41
produces SAS/Graph line style #41, DASH3DOT1 |
static int |
SASGRAPH_LINE42
produces SAS/Graph line style #42, DASH3DOT2 |
static int |
SASGRAPH_LINE43
produces SAS/Graph line style #43, DASH3DOT3 |
static int |
SASGRAPH_LINE44
produces SAS/Graph line style #44, DASH3DOT2DASH3DOT1 |
static int |
SASGRAPH_LINE45
produces SAS/Graph line style #45, DASH3DOT3DASH3DOT1 |
static int |
SASGRAPH_LINE46
produces SAS/Graph line style #46, DASH3DOT3DASH3DOT2 |
Constructor Summary | |
---|---|
StrokeLineStyle()
|
|
StrokeLineStyle(java.awt.Color newColor)
Constructor that takes a line color. |
|
StrokeLineStyle(int newLineStyle,
java.awt.Color newColor,
com.sas.measures.BaseLength newThickness)
Convienience constructor, same as StrokeLineStyle( int, Color, BaseLength, GraphConstance.AUTOMATIC ). |
|
StrokeLineStyle(int newLineStyle,
java.awt.Color newColor,
com.sas.measures.BaseLength newThickness,
int newVisibilityPolicy)
Constructor that takes a SAS/Graph line style number, a line width and a color. |
Method Summary | |
---|---|
void |
apply(StrokeLineStyle theOtherModel)
Utility method to convey properties contained in "theOtherObject" to this object. |
boolean |
equals(java.lang.Object obj)
Determines whether another object is equal to this StrokeLineStyle . |
int |
getSASGraphLineStyle()
Get line appearance settings. |
static int |
getSASGraphLineStyle(java.awt.BasicStroke stroke)
Takes a BasicStroke and returns a SAS/Graph line style number if the stroke corresponds to one. |
java.awt.BasicStroke |
getStroke()
Returns the line appearance settings. |
int |
hashCode()
Computes the hash code for this StrokeLineStyle . |
static java.awt.BasicStroke |
newStroke(int lineStyle,
com.sas.measures.BaseLength lineWidth)
Takes a SAS/Graph line style number as well as a BaseLength and creates a BasicStroke . |
static java.awt.BasicStroke |
newStroke(int lineStyle,
float lineWidth)
Takes a SAS/Graph line style number as well as a line width and creates a BasicStroke . |
void |
setSASGraphLineStyle(int newLineStyle)
Sets the SAS/Graph line style. |
void |
setStroke(java.awt.BasicStroke newStroke)
Set the stroke line style. |
void |
setThickness(com.sas.measures.BaseLength newThickness)
Set thickness for the stroke. |
Methods inherited from class com.sas.graphics.components.LineStyle |
---|
apply, getColor, getThickness, getVisibilityPolicy, setColor, setVisibilityPolicy |
Methods inherited from class com.sas.graphics.components.ModelBase |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel |
Field Detail |
---|
public static final java.lang.String RB_KEY
public static final int SASGRAPH_LINE_UNRECOGNIZED
public static final int SASGRAPH_LINE01
public static final int SASGRAPH_LINE02
public static final int SASGRAPH_LINE03
public static final int SASGRAPH_LINE04
public static final int SASGRAPH_LINE05
public static final int SASGRAPH_LINE06
public static final int SASGRAPH_LINE07
public static final int SASGRAPH_LINE08
public static final int SASGRAPH_LINE09
public static final int SASGRAPH_LINE10
public static final int SASGRAPH_LINE11
public static final int SASGRAPH_LINE12
public static final int SASGRAPH_LINE13
public static final int SASGRAPH_LINE14
public static final int SASGRAPH_LINE15
public static final int SASGRAPH_LINE16
public static final int SASGRAPH_LINE17
public static final int SASGRAPH_LINE18
public static final int SASGRAPH_LINE19
public static final int SASGRAPH_LINE20
public static final int SASGRAPH_LINE21
public static final int SASGRAPH_LINE22
public static final int SASGRAPH_LINE23
public static final int SASGRAPH_LINE24
public static final int SASGRAPH_LINE25
public static final int SASGRAPH_LINE26
public static final int SASGRAPH_LINE27
public static final int SASGRAPH_LINE28
public static final int SASGRAPH_LINE29
public static final int SASGRAPH_LINE30
public static final int SASGRAPH_LINE31
public static final int SASGRAPH_LINE32
public static final int SASGRAPH_LINE33
public static final int SASGRAPH_LINE34
public static final int SASGRAPH_LINE35
public static final int SASGRAPH_LINE36
public static final int SASGRAPH_LINE37
public static final int SASGRAPH_LINE38
public static final int SASGRAPH_LINE39
public static final int SASGRAPH_LINE40
public static final int SASGRAPH_LINE41
public static final int SASGRAPH_LINE42
public static final int SASGRAPH_LINE43
public static final int SASGRAPH_LINE44
public static final int SASGRAPH_LINE45
public static final int SASGRAPH_LINE46
public static final ConstantCollection SASGRAPH_LINE
Constructor Detail |
---|
public StrokeLineStyle()
public StrokeLineStyle(java.awt.Color newColor)
newColor
- color of the lineLineStyle.getColor()
public StrokeLineStyle(int newLineStyle, java.awt.Color newColor, com.sas.measures.BaseLength newThickness, int newVisibilityPolicy)
Also, lineWidth must be greater than or equal to 0.0f. If lineWidth is set to 0.0f, the stroke is rendered as the thinnest possible line for the target device and the antialias hint setting. If lineWidth is set to less than 0.0f, then 0.0f is used. lineStyle valid parameters of type 'public static final int' are:
newLineStyle
- SAS/Graph line style 1-46 to be creatednewThickness
- thickness of the linenewColor
- color of the linenewVisibilityPolicy
- how the line visibility is determinedgetSASGraphLineStyle()
,
LineStyle.getColor()
,
LineStyle.getThickness()
,
LineStyle.getVisibilityPolicy()
public StrokeLineStyle(int newLineStyle, java.awt.Color newColor, com.sas.measures.BaseLength newThickness)
newLineStyle
- SAS/Graph line style 1-46 to be creatednewThickness
- thickness of the linenewColor
- color of the linegetSASGraphLineStyle()
,
LineStyle.getColor()
,
LineStyle.getThickness()
Method Detail |
---|
public void apply(StrokeLineStyle theOtherModel)
Note: Contained "models" (i.e. properties that are subclasses of ModelBase) will in turn be called on to convey their properties to the like contained models in the other object. In that respect this can be considered a "tree" type copy.
Also Note: This is a deep copy. Thus after the copy, mutable properties will not be shared by the two instances.
theOtherModel
- properties to apply to this instancepublic void setStroke(java.awt.BasicStroke newStroke)
SASGraphLine
property
is used to define how the line should look.
newStroke
- a BasicStroke containing line pattern attributes.
an
- IllegalArgumentException is thrown if newStroke
is
non-null and not an instance of BasicStrokegetStroke()
public java.awt.BasicStroke getStroke()
setStroke(java.awt.BasicStroke)
public void setThickness(com.sas.measures.BaseLength newThickness) throws java.lang.IllegalArgumentException
setThickness
in class LineStyle
newThickness
- BaseLength containing line thickness.
java.lang.IllegalArgumentException
- if newThickness is null.LineStyle.getThickness()
public void setSASGraphLineStyle(int newLineStyle)
stroke
property is non-null.
lineStyle valid parameters of type 'public static final int' are:
newLineStyle
- identifies the type of SAS/Graph line style to use
an
- IllegalArgumentException is thrown if newLineStyle is not a valid SAS/Graph line stylegetSASGraphLineStyle()
,
setStroke(java.awt.BasicStroke)
public int getSASGraphLineStyle()
setSASGraphLineStyle(int)
public static java.awt.BasicStroke newStroke(int lineStyle, com.sas.measures.BaseLength lineWidth)
BaseLength
and creates a BasicStroke
.
The valid values are listed here and correspond to SAS/Graph line styles 1-46.
If an unrecognized parameter is passed in for lineStyle then SASGRAPH_LINE01 is used.
If a null lineWidth is pasxed in then a lineWidth of 0 is used.
If a lineWidth is set to 0, the stroke is rendered as the thinnest possible line for the target device and the antialias hint setting. lineStyle valid parameters of type 'public static final int' are:
lineStyle
- SAS/Graph line style 1-46 to be createdlineWidth
- specified line widthgetStroke()
public static java.awt.BasicStroke newStroke(int lineStyle, float lineWidth)
BasicStroke
.
The valid values are listed here and correspond to SAS/Graph line styles 1-46.
If an unrecognized parameter is passed in for lineStyle then SASGRAPH_LINE01 is used.
If lineWidth is set to 0, the stroke is rendered as the thinnest possible line for the target device and the antialias hint setting. If lineWidth is set to less than 0, then 0 is used. lineStyle valid parameters of type 'public static final int' are:
lineStyle
- SAS/Graph line style 1-46 to be createdlineWidth
- specified line widthgetStroke()
public static int getSASGraphLineStyle(java.awt.BasicStroke stroke)
stroke
- SAS/Graph line style 1-46 that was createdgetStroke()
public boolean equals(java.lang.Object obj)
StrokeLineStyle
.
The result is true
if and only if the argument is not
null
and is a StrokeLineStyle
object that has the same
property values as this object.
equals
in class LineStyle
obj
- the object to test for equality with this
StrokeLineStyle
true
if the objects are the same;
false
otherwise.public int hashCode()
StrokeLineStyle
.
hashCode
in class LineStyle
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |