com.sas.graphics.components
Class GraphStyle

com.sas.graphics.components.GraphStyle

public class GraphStyle

GraphStyle class contains graph specific style attributes and properties. A graph style defines the fonts to use, color scheme to apply, if outlines will be drawn around data elements (bars, pie slices, markers, etc.), chart frame is enabled, axes line width, opacity of data elements and chart walls, legend placement and if shadows are drawn on the text elements, etc. Also, a background image can be specified.

Usage

In order to apply a color scheme to a graph style:
        
 GraphStyle graphStyle = new GraphStyle(STYLE_EDUCATION);
 ColorScheme cs = new ColorScheme(ColorScheme.SCHEME_TERRA);        
 graphStyle.applyColorScheme(cs);
 
To apply a graph style to a chart, use the chart's applyGraphStyle() method:
        
 barChartModel.applyGraphStyle(graphStyle);
 
To change the font on this graph style's Title1:
        
 TextStyle ts = graphStyle.getTitle1TextStyle();
 ts.setFont(FontManager.getFont("Trebuchet MS", Font.BOLD, 28));
 ts.apply(ts);
 

Behavior

Graph Styles enable the user to easily define a set of attributes to be applied to a graph. By encapsulating these attributes that make up a style, it is not only easy to apply but to change the overall look of your graph. Each predefined graph style has an associated predefined color scheme. This design allows you to keep all the attributes associated with a particular graph style, but change the color scheme.

The graph style is made up of many other style components, ie. TextStyle, LineStyle, MarkerStyle. These encapsulate the attributes for many of the graph style elements.

Since we never want to allow these sub-styles to be set to NULL because the graph depends upon them not being so, you perform an apply in order to change the settings.

Sharing attributes between GraphStyles and Graphs is not encouraged since each Graph type handles the GraphStyle attributes differently.

Since:
SAS 9.1
See Also:
TextStyle, TickStyle, ShadowStyle, MarkerStyle, StrokeLineStyle, FillStyle, ColorScheme

Field Summary
static java.lang.String RB_KEY
           
static ConstantCollection STYLE
          STYLE enables a set of static actions associated with the public STYLE_ constants.
static int STYLE_ANALYSIS
           
static int STYLE_ASTRONOMY
           
static int STYLE_BANKER
           
static int STYLE_BLOCKPRINT
           
static int STYLE_CONVENTION
           
static int STYLE_CURVE
           
static int STYLE_EDUCATION
           
static int STYLE_ELECTRONICS
           
static int STYLE_GANTTCHART
           
static int STYLE_GEARS
           
static int STYLE_MAGNIFY
           
static int STYLE_MONEY
           
static int STYLE_MONOCHROME
           
static int STYLE_OLAP
           
static int STYLE_RSVP
           
static int STYLE_SCIENCE
           
static int STYLE_SKETCH
           
static int STYLE_STATISTICAL
           
static int STYLE_TORN
           
static int STYLE_WATERCOLOR
           
 
Constructor Summary
GraphStyle()
           
GraphStyle(int newGraphStyleName)
          Constructor that creates a new GraphStyle object with the specific attributes for the named style passed in.
 
Method Summary
 void applyColorScheme(ColorScheme cs)
          Apply a color scheme on this Graph Style.
 void applyTextShadowStyle(ShadowStyle newShadowStyle)
          Sets the shadow on the graph style's text elements.
 ColorScheme asColorScheme()
          Returns a set of colors that will be used when rendering a graph.
 ShadowStyle asTextShadowStyle()
          Extracts the applied shadow on the graph style's text elements, if it is consistent (that is if they all still match).
protected  void firePropertyChange(java.lang.String propertyName, ModelBase oldProperty, ModelBase newProperty)
          Support for reporting bound contained-Model property changes.
protected  void firePropertyChange(java.lang.String propertyName, java.lang.Object oldProperty, java.lang.Object newProperty)
          Support for reporting bound property changes.
 int getAppliedColorSchemeName()
           
 StrokeLineStyle getAxisLineStyle()
          Returns axis line display attributes.
 FillStyle getBackgroundFillStyle()
          Return the background fill attributes.
 java.awt.Color getColumnAxisBackgroundColor()
          Deprecated. use getColumnAxisValueCellBackgroundColor()
 java.awt.Color getColumnAxisValueCellBackgroundColor()
          Returns the color for the Column matrix axis value cell's background color.
 int getColumnRowAxisValueShadingPolicy()
           
 DataElementStyles getDataElementStyles()
          Returns the Styles used for data elements.
 TextStyle getDataLabelTextStyle()
          Returns the display attributes used for data label text.
 java.awt.Color getDataTipBackgroundColor()
          Returns the interior color of the DatatTip's window.
 TextStyle getDataTipTextStyle()
          Returns the display attributes used for data tip text.
 FillStyle getFloorFillStyle()
          Returns the FillStyle attributes used for the chart floor.
 TextStyle getFootnote1TextStyle()
          Return the TextStyle used for the first footnote.
 TextStyle getFootnote2TextStyle()
          Return the TextStyle used for the second footnote.
 LineStyle getFrameLineStyle()
          Gets the frame line style Note: null may be returned.
 StrokeLineStyle getGridLineStyle()
          Returns grid line display attributes.
 TextStyle getLabelTextStyle()
          Returns the text attributes used on axis labels and legend label.
 FillStyle getLegendBackgroundFillStyle()
          Returns the FillStyle attributes used on legend background.
 ShadowStyle getLegendShadowStyle()
          Returns the ShadowStyle attributes used on legends.
 TickStyle getMajorTickStyle()
          Returns the axes' major tick mark display attributes.
 TickStyle getMinorTickStyle()
          Returns the axes' minor tick mark display attributes.
 int getName()
          Returns the value of the predefined graph style name.
 java.awt.Color getRowAxisBackgroundColor()
          Deprecated. use getRowAxisValueCellBackgroundColor()
 java.awt.Color getRowAxisValueCellBackgroundColor()
          Returns the color for the Row matrix axis value cell's background color.
 java.awt.Color getSelectionAccentColor()
          Returns the secondary color used to indicate selection.
 java.awt.Color getSelectionColor()
          Returns the primary color used to indicate selection.
 TextStyle getTitle1TextStyle()
          Return the TextStyle used for the first title.
 TextStyle getTitle2TextStyle()
          Return the TextStyle used for the second title.
 TextStyle getTitle3TextStyle()
          Return the TextStyle used for the third title.
 TextStyle getTitle4TextStyle()
          Return the TextStyle used for the fourth title.
 TextStyle getValueTextStyle()
          Returns the text attributes used for axis values text.
 FillStyle getWallFillStyle()
          Returns the FillStyle attributes used for the axis walls.
 FillStyle getWeekendBandFillStyle()
          Returns the FillStyle attributes used for the weekend bands.
 boolean isModified()
          Returns whether or not the style has been modified from its initial defined state.
 void setAxisLineStyle(StrokeLineStyle newLineStyle)
          Set axis line display attributes.
 void setBackgroundFillStyle(FillStyle newFillStyle)
          Set the background fill attributes.
 void setColumnAxisBackgroundColor(java.awt.Color newColor)
          Deprecated. use setColumnAxisValueCellBackgroundColor(java.awt.Color)
 void setColumnAxisValueCellBackgroundColor(java.awt.Color newColor)
          Set the color for the Column matrix axis value cell's background color.
 void setColumnRowAxisValueShadingPolicy(int newShadingPolicy)
           
 void setDataLabelTextStyle(TextStyle newTextStyle)
          Set the display attributes used for data label text (such as the BarChart's bar labels, the PieChart's slice labels or the ScatterChart's marker labels).
 void setDataTipBackgroundColor(java.awt.Color newColor)
          Sets the interior color of the DatatTip's window.
 void setDataTipTextStyle(TextStyle newTextStyle)
          Set the display attributes used for data tip text.
 void setFloorFillStyle(FillStyle newFillStyle)
          Set the FillStyle attributes used for the chart floor.
 void setFootnote1TextStyle(TextStyle newTextStyle)
          Set the TextStyle used for the first footnote.
 void setFootnote2TextStyle(TextStyle newTextStyle)
          Set the TextStyle used for the second footnote.
 void setFrameLineStyle(LineStyle newFrameLineStyle)
          Sets the frame line style Note: this property can be null.
 void setGridLineStyle(StrokeLineStyle newLineStyle)
          Set the grid line display attributes.
 void setLabelTextStyle(TextStyle newTextStyle)
          Set the text attributes used on axis labels and legend label.
 void setLegendBackgroundFillStyle(FillStyle newFillStyle)
          Set the FillStyle attributes used on legend background.
 void setLegendShadowStyle(ShadowStyle newShadowStyle)
          Set the ShadowStyle attributes used on legends.
 void setMajorTickStyle(TickStyle newTickStyle)
          Set axes' major tick mark display attributes.
 void setMinorTickStyle(TickStyle newTickStyle)
          Set axes' minor tick mark display attributes.
 void setRowAxisBackgroundColor(java.awt.Color newColor)
          Deprecated. use setRowAxisValueCellBackgroundColor(java.awt.Color)
 void setRowAxisValueCellBackgroundColor(java.awt.Color newColor)
          Set the color for the Row matrix axis value cell's background color.
 void setSelectionAccentColor(java.awt.Color neweSelectionAccentColor)
          Sets the secondary color used to indicate selection.
 void setSelectionColor(java.awt.Color newSelectionColor)
          Sets the primary color used to indicate selection.
 void setTitle1TextStyle(TextStyle newTextStyle)
          Set the TextStyle used for the first title.
 void setTitle2TextStyle(TextStyle newTextStyle)
          Set the TextStyle used for the second title.
 void setTitle3TextStyle(TextStyle newTextStyle)
          Set the TextStyle used for the third title.
 void setTitle4TextStyle(TextStyle newTextStyle)
          Set the TextStyle used for the fourth title.
 void setValueTextStyle(TextStyle newTextStyle)
          Set the text attributes used for axis values text.
 void setWallFillStyle(FillStyle newFillStyle)
          Set the FillStyle attributes used for the axis walls.
 void setWeekendBandFillStyle(FillStyle newFillStyle)
          Set the FillStyle attributes used for weekend bands.
 java.lang.String toString()
           
 
Methods inherited from class com.sas.graphics.components.ModelBase
addPropertyChangeListener, equals, firePropertyChange, firePropertyChange, firePropertyChange, hashCode, removePropertyChangeListener, setContainedModel
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values

STYLE_ANALYSIS

public static final int STYLE_ANALYSIS
See Also:
Constant Field Values

STYLE_ASTRONOMY

public static final int STYLE_ASTRONOMY
See Also:
Constant Field Values

STYLE_BANKER

public static final int STYLE_BANKER
See Also:
Constant Field Values

STYLE_BLOCKPRINT

public static final int STYLE_BLOCKPRINT
See Also:
Constant Field Values

STYLE_CONVENTION

public static final int STYLE_CONVENTION
See Also:
Constant Field Values

STYLE_CURVE

public static final int STYLE_CURVE
See Also:
Constant Field Values

STYLE_EDUCATION

public static final int STYLE_EDUCATION
See Also:
Constant Field Values

STYLE_ELECTRONICS

public static final int STYLE_ELECTRONICS
See Also:
Constant Field Values

STYLE_GEARS

public static final int STYLE_GEARS
See Also:
Constant Field Values

STYLE_MAGNIFY

public static final int STYLE_MAGNIFY
See Also:
Constant Field Values

STYLE_MONEY

public static final int STYLE_MONEY
See Also:
Constant Field Values

STYLE_MONOCHROME

public static final int STYLE_MONOCHROME
See Also:
Constant Field Values

STYLE_RSVP

public static final int STYLE_RSVP
See Also:
Constant Field Values

STYLE_SCIENCE

public static final int STYLE_SCIENCE
See Also:
Constant Field Values

STYLE_SKETCH

public static final int STYLE_SKETCH
See Also:
Constant Field Values

STYLE_STATISTICAL

public static final int STYLE_STATISTICAL
See Also:
Constant Field Values

STYLE_TORN

public static final int STYLE_TORN
See Also:
Constant Field Values

STYLE_WATERCOLOR

public static final int STYLE_WATERCOLOR
See Also:
Constant Field Values

STYLE_OLAP

public static final int STYLE_OLAP
See Also:
Constant Field Values

STYLE_GANTTCHART

public static final int STYLE_GANTTCHART
See Also:
Constant Field Values

STYLE

public static final ConstantCollection STYLE
STYLE enables a set of static actions associated with the public STYLE_ constants. These actions include: (1) validation (2) translation between constant value and string value (3) translation between constant value and JSP string value (4) translation between constant value and localized string value (5) generation of constant int or string arrays

Constructor Detail

GraphStyle

public GraphStyle()

GraphStyle

public GraphStyle(int newGraphStyleName)
Constructor that creates a new GraphStyle object with the specific attributes for the named style passed in. The named style will be one of the predefined graph styles.

If the parameter is not recognised as one of the valid predefined graph style names, Convention graph style is created.

Valid parameters are:

Parameters:
newGraphStyleName - a valid named style which you wish to be created.
Method Detail

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  java.lang.Object oldProperty,
                                  java.lang.Object newProperty)
Description copied from class: ModelBase
Support for reporting bound property changes. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Overrides:
firePropertyChange in class ModelBase
Parameters:
propertyName - the property being changed
oldProperty - the value being changed from
newProperty - the value being changed to

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  ModelBase oldProperty,
                                  ModelBase newProperty)
Description copied from class: ModelBase
Support for reporting bound contained-Model property changes. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Overrides:
firePropertyChange in class ModelBase
Parameters:
propertyName - the property being changed
oldProperty - the value being changed from
newProperty - the value being changed to

getName

public int getName()
Returns the value of the predefined graph style name.

Returns:
String object containing the named style.

isModified

public boolean isModified()
Returns whether or not the style has been modified from its initial defined state.

Returns:
boolean true signifies that the style has been modified

setTitle1TextStyle

public void setTitle1TextStyle(TextStyle newTextStyle)
                        throws java.lang.IllegalArgumentException
Set the TextStyle used for the first title.

Parameters:
newTextStyle - the 1st title's display attributes
Throws:
java.lang.IllegalArgumentException - if newTextStyle is null.
See Also:
getTitle1TextStyle(), TextStyle.apply(com.sas.graphics.components.TextStyle)

getTitle1TextStyle

public TextStyle getTitle1TextStyle()
Return the TextStyle used for the first title.

Returns:
text attributes to be used for first title.
See Also:
setTitle1TextStyle(com.sas.graphics.components.TextStyle), TextStyle.apply(com.sas.graphics.components.TextStyle)

setTitle2TextStyle

public void setTitle2TextStyle(TextStyle newTextStyle)
                        throws java.lang.IllegalArgumentException
Set the TextStyle used for the second title.

Parameters:
newTextStyle - the 2nd title's display attributes
Throws:
java.lang.IllegalArgumentException - if newTextStyle is null.
See Also:
getTitle2TextStyle(), TextStyle.apply(com.sas.graphics.components.TextStyle)

getTitle2TextStyle

public TextStyle getTitle2TextStyle()
Return the TextStyle used for the second title.

Returns:
text attributes to be used for second title.
See Also:
setTitle2TextStyle(com.sas.graphics.components.TextStyle), TextStyle.apply(com.sas.graphics.components.TextStyle)

setTitle3TextStyle

public void setTitle3TextStyle(TextStyle newTextStyle)
                        throws java.lang.IllegalArgumentException
Set the TextStyle used for the third title.

Parameters:
newTextStyle - the 3rd title's display attributes
Throws:
java.lang.IllegalArgumentException - if newTextStyle is null.
See Also:
getTitle3TextStyle(), TextStyle.apply(com.sas.graphics.components.TextStyle)

getTitle3TextStyle

public TextStyle getTitle3TextStyle()
Return the TextStyle used for the third title.

Returns:
text attributes to be used for third title.
See Also:
setTitle3TextStyle(com.sas.graphics.components.TextStyle), TextStyle.apply(com.sas.graphics.components.TextStyle)

setTitle4TextStyle

public void setTitle4TextStyle(TextStyle newTextStyle)
                        throws java.lang.IllegalArgumentException
Set the TextStyle used for the fourth title.

Parameters:
newTextStyle - the 4th title's display attributes
Throws:
java.lang.IllegalArgumentException - if newTextStyle is null.
See Also:
getTitle4TextStyle(), TextStyle.apply(com.sas.graphics.components.TextStyle)

getTitle4TextStyle

public TextStyle getTitle4TextStyle()
Return the TextStyle used for the fourth title.

Returns:
text attributes to be used for fourth title.
See Also:
setTitle4TextStyle(com.sas.graphics.components.TextStyle), TextStyle.apply(com.sas.graphics.components.TextStyle)

setFootnote1TextStyle

public void setFootnote1TextStyle(TextStyle newTextStyle)
                           throws java.lang.IllegalArgumentException
Set the TextStyle used for the first footnote.

Parameters:
newTextStyle - the 1st footnote's display attributes
Throws:
java.lang.IllegalArgumentException - if newTextStyle is null.
See Also:
getFootnote1TextStyle(), TextStyle.apply(com.sas.graphics.components.TextStyle)

getFootnote1TextStyle

public TextStyle getFootnote1TextStyle()
Return the TextStyle used for the first footnote.

Returns:
text attributes to be used for first footnote.
See Also:
setFootnote1TextStyle(com.sas.graphics.components.TextStyle), TextStyle.apply(com.sas.graphics.components.TextStyle)

setFootnote2TextStyle

public void setFootnote2TextStyle(TextStyle newTextStyle)
                           throws java.lang.IllegalArgumentException
Set the TextStyle used for the second footnote.

Parameters:
newTextStyle - the 2nd footnote's display attributes
Throws:
java.lang.IllegalArgumentException - if newTextStyle is null.
See Also:
getFootnote2TextStyle(), TextStyle.apply(com.sas.graphics.components.TextStyle)

getFootnote2TextStyle

public TextStyle getFootnote2TextStyle()
Return the TextStyle used for the second footnote.

Returns:
text attributes to be used for second footnote.
See Also:
setFootnote2TextStyle(com.sas.graphics.components.TextStyle), TextStyle.apply(com.sas.graphics.components.TextStyle)

setBackgroundFillStyle

public void setBackgroundFillStyle(FillStyle newFillStyle)
                            throws java.lang.IllegalArgumentException
Set the background fill attributes.

Parameters:
newFillStyle - the background display attributes
Throws:
java.lang.IllegalArgumentException - if newFillStyle is null.
See Also:
getBackgroundFillStyle(), FillStyle.apply(com.sas.graphics.components.FillStyle)

getBackgroundFillStyle

public FillStyle getBackgroundFillStyle()
Return the background fill attributes.

Returns:
background fill attributes
See Also:
FillStyle.apply(com.sas.graphics.components.FillStyle)

setWallFillStyle

public void setWallFillStyle(FillStyle newFillStyle)
                      throws java.lang.IllegalArgumentException
Set the FillStyle attributes used for the axis walls. Only applies to charts that have axes.

Parameters:
newFillStyle - the axis wall display attributes
Throws:
java.lang.IllegalArgumentException - if newFillStyle is null.
See Also:
getWallFillStyle(), FillStyle.apply(com.sas.graphics.components.FillStyle)

getWallFillStyle

public FillStyle getWallFillStyle()
Returns the FillStyle attributes used for the axis walls. Note: null may be returned.

Only applies to charts that have axes.

Returns:
FillStyle attributes for filled chart walls.

setWeekendBandFillStyle

public void setWeekendBandFillStyle(FillStyle newFillStyle)
                             throws java.lang.IllegalArgumentException
Set the FillStyle attributes used for weekend bands. Only applies to charts that have date axes.

Parameters:
newFillStyle - the weekend band display attributes
Throws:
java.lang.IllegalArgumentException - if newFillStyle is null.
See Also:
getWeekendBandFillStyle(), FillStyle.apply(com.sas.graphics.components.FillStyle)

getWeekendBandFillStyle

public FillStyle getWeekendBandFillStyle()
Returns the FillStyle attributes used for the weekend bands. Note: null may be returned.

Only applies to charts that have date axes.

Returns:
FillStyle attributes for filled weekend bands.
See Also:
setWeekendBandFillStyle(FillStyle)

setFloorFillStyle

public void setFloorFillStyle(FillStyle newFillStyle)
                       throws java.lang.IllegalArgumentException
Set the FillStyle attributes used for the chart floor. Only applies to charts that have axes.

Parameters:
newFillStyle - the axis floor display attributes
Throws:
java.lang.IllegalArgumentException - if newFillStyle is null.
See Also:
getFloorFillStyle(), FillStyle.apply(com.sas.graphics.components.FillStyle)

getFloorFillStyle

public FillStyle getFloorFillStyle()
Returns the FillStyle attributes used for the chart floor. Only applies to charts that have axes.

Returns:
FillStyle attributes for filled chart floor.
See Also:
setFloorFillStyle(com.sas.graphics.components.FillStyle), FillStyle.apply(com.sas.graphics.components.FillStyle)

setLegendBackgroundFillStyle

public void setLegendBackgroundFillStyle(FillStyle newFillStyle)
Set the FillStyle attributes used on legend background. Note: this property can be null. The asGraphStyle method on the Graph class will return a GraphStyle. If the legendBackgroundFillStyle properties vary between the Graph's legends then the state is considered ambiguous. null is used to signify this ambiguity.

Note: The legend background does not support gradient fills.

Parameters:
newFillStyle - the legend background display attributes
See Also:
getLegendBackgroundFillStyle(), FillStyle.apply(com.sas.graphics.components.FillStyle)

getLegendBackgroundFillStyle

public FillStyle getLegendBackgroundFillStyle()
Returns the FillStyle attributes used on legend background. null may be returned. Note: The legend background does not support gradient fills.

Returns:
FillStyle attributes for filled legend background.
See Also:
setLegendBackgroundFillStyle(com.sas.graphics.components.FillStyle), FillStyle.apply(com.sas.graphics.components.FillStyle)

setLegendShadowStyle

public void setLegendShadowStyle(ShadowStyle newShadowStyle)
Set the ShadowStyle attributes used on legends. Note: this property can be null. The asGraphStyle method on the Graph class will return a GraphStyle. If the legendShadowStyle properties vary between the Graph's legends (where applicable) then the state is considered ambiguious. null is used to signify this ambiguity.

Parameters:
newShadowStyle - the legend background display attributes
See Also:
getLegendShadowStyle(), ShadowStyle.apply(com.sas.graphics.components.ShadowStyle)

getLegendShadowStyle

public ShadowStyle getLegendShadowStyle()
Returns the ShadowStyle attributes used on legends. Note: null may be returned.

Returns:
ShadowStyle attributes for legends.
See Also:
setLegendShadowStyle(com.sas.graphics.components.ShadowStyle), ShadowStyle.apply(com.sas.graphics.components.ShadowStyle)

setLabelTextStyle

public void setLabelTextStyle(TextStyle newTextStyle)
Set the text attributes used on axis labels and legend label. Note: this property can be null. The asGraphStyle method on the Graph class will return a GraphStyle. If the labelTextStyle properties vary between the Graph's labels then the state is considered ambiguous. null is used to signify this ambiguity.

Parameters:
newTextStyle - the axis label display attributes
See Also:
getLabelTextStyle(), TextStyle.apply(com.sas.graphics.components.TextStyle)

getLabelTextStyle

public TextStyle getLabelTextStyle()
Returns the text attributes used on axis labels and legend label. Note: null may be returned.

Returns:
text attributes to be attributes for axis labels and legend labels.
See Also:
setLabelTextStyle(com.sas.graphics.components.TextStyle), TextStyle.apply(com.sas.graphics.components.TextStyle)

setValueTextStyle

public void setValueTextStyle(TextStyle newTextStyle)
Set the text attributes used for axis values text. Note: this property can be null. The asGraphStyle method on the Graph class will return a GraphStyle. If the valueTextStyle properties vary between the Graph's values then the state is considered ambiguous. null is used to signify this ambiguity.

Parameters:
newTextStyle - the axis value display attributes
See Also:
getValueTextStyle(), TextStyle.apply(com.sas.graphics.components.TextStyle)

getValueTextStyle

public TextStyle getValueTextStyle()
Returns the text attributes used for axis values text. Note: null may be returned.

Returns:
text attributes to be attributes for axis values and legend values.
See Also:
setValueTextStyle(com.sas.graphics.components.TextStyle), TextStyle.apply(com.sas.graphics.components.TextStyle)

setDataLabelTextStyle

public void setDataLabelTextStyle(TextStyle newTextStyle)
Set the display attributes used for data label text (such as the BarChart's bar labels, the PieChart's slice labels or the ScatterChart's marker labels). Note: this property can be null. The asGraphStyle method on the Graph class will return a GraphStyle. If the TextStyle properties vary between the Graph's data labels then the state is considered ambiguous. null is used to signify this ambiguity.

Parameters:
newTextStyle - the data label text display attributes
See Also:
getDataLabelTextStyle(), TextStyle.apply(com.sas.graphics.components.TextStyle)

getDataLabelTextStyle

public TextStyle getDataLabelTextStyle()
Returns the display attributes used for data label text. Note: null may be returned.

Returns:
display attributes for data label text
See Also:
setDataLabelTextStyle(com.sas.graphics.components.TextStyle), TextStyle.apply(com.sas.graphics.components.TextStyle)

setDataTipTextStyle

public void setDataTipTextStyle(TextStyle newTextStyle)
Set the display attributes used for data tip text.

Parameters:
newTextStyle - the data tip text display attributes
See Also:
getDataTipTextStyle(), TextStyle.apply(com.sas.graphics.components.TextStyle)

getDataTipTextStyle

public TextStyle getDataTipTextStyle()
Returns the display attributes used for data tip text. Note: null may be returned.

Returns:
display attributes for data tip text
See Also:
setDataTipTextStyle(com.sas.graphics.components.TextStyle), TextStyle.apply(com.sas.graphics.components.TextStyle)

setDataTipBackgroundColor

public void setDataTipBackgroundColor(java.awt.Color newColor)
Sets the interior color of the DatatTip's window. The default value is java.awt.SystemColor.window;

Parameters:
newColor - the color of the DatatTip's window interior
See Also:
getDataTipBackgroundColor()

getDataTipBackgroundColor

public java.awt.Color getDataTipBackgroundColor()
Returns the interior color of the DatatTip's window.

Returns:
the interior color of the DatatTip's window.
See Also:
setDataTipBackgroundColor(java.awt.Color)

setRowAxisValueCellBackgroundColor

public void setRowAxisValueCellBackgroundColor(java.awt.Color newColor)
Set the color for the Row matrix axis value cell's background color. This is an optional parameter (i.e. it may be null). If their value is null the the graph will use the solidFillColor property in the LegendBackgroundFillStyle.

Parameters:
newColor - the row matrix axis value cell background color
See Also:
getRowAxisValueCellBackgroundColor()

getRowAxisValueCellBackgroundColor

public java.awt.Color getRowAxisValueCellBackgroundColor()
Returns the color for the Row matrix axis value cell's background color. This is an optional parameter (i.e. it may be null) in which case the graph will use the solidFillColor in the LegendBackgroundFillStyle.

Returns:
the row matrix axis value cell background color
See Also:
setRowAxisValueCellBackgroundColor(java.awt.Color)

setColumnAxisValueCellBackgroundColor

public void setColumnAxisValueCellBackgroundColor(java.awt.Color newColor)
Set the color for the Column matrix axis value cell's background color. This is an optional parameter (i.e. it may be null). If their value is null the the graph will use the solidFillColor property in the LegendBackgroundFillStyle.

Parameters:
newColor - the column matrix axis value cell background color
See Also:
getColumnAxisValueCellBackgroundColor()

getColumnAxisValueCellBackgroundColor

public java.awt.Color getColumnAxisValueCellBackgroundColor()
Returns the color for the Column matrix axis value cell's background color. This is an optional parameter (i.e. it may be null) in which case the graph will use the solidFillColor in the LegendBackgroundFillStyle.

Returns:
the column matrix axis value cell background color
See Also:
setColumnAxisValueCellBackgroundColor(java.awt.Color)

setAxisLineStyle

public void setAxisLineStyle(StrokeLineStyle newLineStyle)
Set axis line display attributes. Note: this property can be null. The asGraphStyle method on the Graph class will return a GraphStyle. If the axisLineStyle properties vary between the Graph's axes then the state is considered ambiguous. null is used to signify this ambiguity.

Parameters:
newLineStyle - the axis line display attributes
See Also:
getAxisLineStyle(), LineStyle.apply(com.sas.graphics.components.LineStyle)

getAxisLineStyle

public StrokeLineStyle getAxisLineStyle()
Returns axis line display attributes. Note: null may be returned.

Returns:
StrokeLineStyle attributes for axis lines.
See Also:
setAxisLineStyle(com.sas.graphics.components.StrokeLineStyle), StrokeLineStyle.apply(com.sas.graphics.components.StrokeLineStyle)

setGridLineStyle

public void setGridLineStyle(StrokeLineStyle newLineStyle)
Set the grid line display attributes. Note: this property can be null. The asGraphStyle method on the Graph class will return a GraphStyle. If the gridLineStyle properties vary between the Graph's axes then the state is considered ambiguous. null is used to signify this ambiguity.

Parameters:
newLineStyle - the grid line display attributes
See Also:
getGridLineStyle(), StrokeLineStyle.apply(com.sas.graphics.components.StrokeLineStyle)

getGridLineStyle

public StrokeLineStyle getGridLineStyle()
Returns grid line display attributes. Note: null may be returned.

Returns:
StrokeLineStyle attributes for axis lines.
See Also:
setGridLineStyle(com.sas.graphics.components.StrokeLineStyle), StrokeLineStyle.apply(com.sas.graphics.components.StrokeLineStyle)

setMajorTickStyle

public void setMajorTickStyle(TickStyle newTickStyle)
Set axes' major tick mark display attributes. Note: this property can be null. The asGraphStyle method on the Graph class will return a GraphStyle. If the majorTickStyle properties vary between the Graph's axes then the state is considered ambiguous. null is used to signify this ambiguity.

Parameters:
newTickStyle - the axes' major tick mark display attributes
See Also:
getMajorTickStyle(), TickStyle.apply(com.sas.graphics.components.TickStyle)

getMajorTickStyle

public TickStyle getMajorTickStyle()
Returns the axes' major tick mark display attributes. Note: null may be returned.

Returns:
TickStyle major tick mark display attributes
See Also:
setMajorTickStyle(com.sas.graphics.components.TickStyle), TickStyle.apply(com.sas.graphics.components.TickStyle)

setMinorTickStyle

public void setMinorTickStyle(TickStyle newTickStyle)
Set axes' minor tick mark display attributes. Note: this property can be null. The asGraphStyle method on the Graph class will return a GraphStyle. If the minorTickStyle properties vary between the Graph's axes then the state is considered ambiguous. null is used to signify this ambiguity.

Parameters:
newTickStyle - the axes' minor tick mark display attributes
See Also:
getMinorTickStyle(), TickStyle.apply(com.sas.graphics.components.TickStyle)

getMinorTickStyle

public TickStyle getMinorTickStyle()
Returns the axes' minor tick mark display attributes. Note: null may be returned.

Returns:
TickStyle minor tick mark display attributes
See Also:
setMinorTickStyle(com.sas.graphics.components.TickStyle), TickStyle.apply(com.sas.graphics.components.TickStyle)

getDataElementStyles

public DataElementStyles getDataElementStyles()
Returns the Styles used for data elements.

Returns:
DataElementStyles styles used for data elements.
See Also:
DataElementStyles.apply(com.sas.graphics.components.DataElementStyles)

setSelectionColor

public void setSelectionColor(java.awt.Color newSelectionColor)
                       throws java.lang.IllegalArgumentException
Sets the primary color used to indicate selection. The selectionAccentColor (when applicable) appears as a secondary indicator on selected items. The selectionColor usually appears as a filled area if the selected item. In the absence of a fill area the selectionColor typically appears as the primary color used to draw the item.

In the case of selected text the selectionColor is applied as the text's background color.

The default value is java.awt.SystemColor.textHighlight.

Graph.applyGraphStyle(GraphStyle) must be called before this property setting will appear in a Graph.

Parameters:
newSelectionColor - the primary color used to indicate selection.
Throws:
java.lang.IllegalArgumentException
See Also:
getSelectionColor()

getSelectionColor

public java.awt.Color getSelectionColor()
Returns the primary color used to indicate selection.

Returns:
the primary color used to indicate selection.
See Also:
setSelectionColor(java.awt.Color)

setSelectionAccentColor

public void setSelectionAccentColor(java.awt.Color neweSelectionAccentColor)
                             throws java.lang.IllegalArgumentException
Sets the secondary color used to indicate selection. The selectionAccentColor (when applicable) appears as a secondary indicator on selected items. The selectionAccentColor typically appears on the outline of selected items.

In the case of selected text the selectionAccentColor is applied as the text's foreground color.

The default value is java.awt.SystemColor.textHighlightText.

Graph.applyGraphStyle(ColorScheme) must be called before this property setting will appear in a Graph.

Parameters:
neweSelectionAccentColor - the secondary color used to indicate selection.
Throws:
java.lang.IllegalArgumentException
See Also:
getSelectionAccentColor()

getSelectionAccentColor

public java.awt.Color getSelectionAccentColor()
Returns the secondary color used to indicate selection.

Returns:
the the secondary color used to indicate selection.
See Also:
setSelectionAccentColor(java.awt.Color)

setFrameLineStyle

public void setFrameLineStyle(LineStyle newFrameLineStyle)
Sets the frame line style Note: this property can be null. The asGraphStyle method on the Graph class will return a GraphStyle. If the frameLineStyle properties vary between the Graph's matrix axes, legend and frame then the state is considered ambiguous. null is used to signify this ambiguity.

Parameters:
newFrameLineStyle - the frame line style properties for graph and legend
See Also:
getFrameLineStyle()

getFrameLineStyle

public LineStyle getFrameLineStyle()
Gets the frame line style Note: null may be returned.

Returns:
the frame line style for graph and legend
See Also:
setFrameLineStyle(com.sas.graphics.components.LineStyle)

setRowAxisBackgroundColor

public void setRowAxisBackgroundColor(java.awt.Color newColor)
Deprecated. use setRowAxisValueCellBackgroundColor(java.awt.Color)


getRowAxisBackgroundColor

public java.awt.Color getRowAxisBackgroundColor()
Deprecated. use getRowAxisValueCellBackgroundColor()


setColumnAxisBackgroundColor

public void setColumnAxisBackgroundColor(java.awt.Color newColor)
Deprecated. use setColumnAxisValueCellBackgroundColor(java.awt.Color)


getColumnAxisBackgroundColor

public java.awt.Color getColumnAxisBackgroundColor()
Deprecated. use getColumnAxisValueCellBackgroundColor()


setColumnRowAxisValueShadingPolicy

public void setColumnRowAxisValueShadingPolicy(int newShadingPolicy)

getColumnRowAxisValueShadingPolicy

public int getColumnRowAxisValueShadingPolicy()

applyTextShadowStyle

public void applyTextShadowStyle(ShadowStyle newShadowStyle)
Sets the shadow on the graph style's text elements.

Parameters:
newShadowStyle - the shadow attribute for the text elements

asTextShadowStyle

public ShadowStyle asTextShadowStyle()
Extracts the applied shadow on the graph style's text elements, if it is consistent (that is if they all still match). If there are inconsistencies, returns null.

Returns:
the applied shadow attribute for the text elements, or null

applyColorScheme

public void applyColorScheme(ColorScheme cs)
Apply a color scheme on this Graph Style. The colors specified in this color scheme are moved into the Graph Style. Any individual color setting done in Graph Style after this method is called will be over written when this method is subsquently called again. See the getColorScheme() method.

Note: Any color transparency set on an individual color object is multiplied by the transparency found specified in the graph style for the colors found in the legend background, background, wall, floor and data elements.


getAppliedColorSchemeName

public int getAppliedColorSchemeName()

asColorScheme

public ColorScheme asColorScheme()
Returns a set of colors that will be used when rendering a graph. Since the colors are stored in a graph style and an instance of a ColorScheme object is not kept, this method goes through the graph style and retieves the color values.




Copyright © 2009 SAS Institute Inc. All Rights Reserved.