|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.ColorScheme
public class ColorScheme
ColorScheme class contains attributes for a color scheme. There are several predefined color schemes available. Color schemes are available to all graph types. In addition to the data elements, colors are defined for common graph elements like titles, footnotes and background.
An instance of one of the predefined color schemes is created when a new instance of ColorScheme is created. If no parameter is used in the contructor, the default SCHEME_TERRA is created.
The predefined color schemes are:
/** Create and apply the Autumn color scheme to the graph style. GraphStyle graphStyle = new GraphStyle(STYLE_CONVENTION); ColorScheme cs = new ColorScheme(ColorScheme.SCHEME_AUTUMN); graphStyle.applyColorScheme(cs);
From this retrieved color scheme, you can use the ColorScheme's methods to individually set colors on any of the graph components defined in a color scheme.
Once the colors have been set on the color scheme, GraphStyle.applyColorScheme(ColorScheme) needs to be called before the colors in the graph change.
It should be noted that an actual instance of a ColorScheme is not stored in a GraphStyle, and the GraphStyle.getColorScheme() method simply collects the colors from the individual StrokeLineStyle, TextStyle, MarkerStyle, etc. as well as those stored directly in the GraphStyle.
GraphStyle
,
DataElementColors
Field Summary | |
---|---|
static java.lang.String |
RB_KEY
|
static ConstantCollection |
SCHEME
SCHEME enables a set of static actions associated with the public SCHEME_ constants. |
static int |
SCHEME_AUTUMN
The "Autumn" predefined color scheme. |
static int |
SCHEME_BRIGHT
The "Bright" predefined color scheme. |
static int |
SCHEME_CARNIVAL
The "Carnival" predefined color scheme. |
static int |
SCHEME_COMMERCE
The "Commerce" predefined color scheme. |
static int |
SCHEME_DECO
The "Deco" predefined color scheme. |
static int |
SCHEME_GANTTCHART
The "Gantt Chart" predefined color scheme. |
static int |
SCHEME_GRAYSCALE
The "Grayscale" predefined color scheme. |
static int |
SCHEME_INDUSTRY
The "Industry" predefined color scheme. |
static int |
SCHEME_MAGELLAN
The "Magellan" predefined color scheme. |
static int |
SCHEME_NEON
The "Neon" predefined color scheme. |
static int |
SCHEME_OCEAN
The "Ocean" predefined color scheme. |
static int |
SCHEME_PASTEL
The "Pastel" predefined color scheme. |
static int |
SCHEME_PICNIC
The "Picnic" predefined color scheme. |
static int |
SCHEME_PINE
The "Pine" predefined color scheme. |
static int |
SCHEME_TERRA
The "Terra" predefined color scheme. |
static int |
SCHEME_WHEAT
The "Wheat" predefined color scheme. |
static int |
SCHEME_WOODLAND
The "Woodland" predefined color scheme. |
static int |
SCHEME_ZUNI
The "Zuni" predefined color scheme. |
Constructor Summary | |
---|---|
ColorScheme()
Default constructor that creates the default Terra color scheme. |
|
ColorScheme(int newName)
Constructor that creates the requested color scheme if passed a valid value, otherwise it creates the default Terra color scheme. |
Method Summary | |
---|---|
boolean |
equals(ColorScheme that)
|
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldProperty,
java.lang.Object newProperty)
Support for reporting bound property changes. |
java.awt.Color |
getAxisLineColor()
Gets the color for the axis lines. |
java.awt.Color |
getBackgroundColor()
Gets the color that is to be used for the graph background. |
java.awt.Color |
getColumnAxisBackgroundColor()
Gets the color that is to be used for the column axis background. |
java.awt.Color |
getColumnAxisValueCellBackgroundColor()
Gets the color that is to be used for the column axis background. |
DataElementColors |
getDataElementColors()
Returns the Colors used for data elements. |
java.awt.Color |
getDataLabelColor()
Gets the color of data label text of data elements. |
java.awt.Color |
getDataTipColor()
Gets the color of data tip text. |
java.awt.Color |
getFloorColor()
Gets the color to be used on the chart floor. |
java.awt.Color |
getFrameColor()
Gets the frame line color. |
java.awt.Color |
getGridLineColor()
Returns the grid line color. |
java.awt.Color |
getLabelColor()
Gets the color of the axis and the legend label text. |
java.awt.Color |
getLegendBackgroundColor()
Gets the legend background color. |
java.awt.Color |
getMajorTickColor()
Returns the major tick mark color. |
java.awt.Color |
getMinorTickColor()
Returns the minor tick mark color. |
int |
getName()
Gets what color scheme this is. |
java.awt.Color |
getRowAxisBackgroundColor()
Gets the color that is to be used for the row axis background. |
java.awt.Color |
getRowAxisValueCellBackgroundColor()
Gets the color that is to be used for the row axis background. |
java.awt.Color |
getSelectionAccentColor()
Returns the secondary color used to indicate selection. |
java.awt.Color |
getSelectionColor()
Returns the primary color used to indicate selection. |
java.awt.Color |
getShadowColor()
Gets the shadow color. |
java.awt.Color |
getTextFrameColor()
Gets the color specified for frame outline around the text. |
java.awt.Color |
getTitleFootnoteColor()
Gets the color of titles and footnotes. |
java.awt.Color |
getValueColor()
Gets the color of value text of axis and legend values. |
java.awt.Color |
getWallColor()
Gets the color to be used for the chart walls. |
java.awt.Color |
getWeekendBandColor()
Returns the color applied to Weekend Bands. |
boolean |
isModified()
Returns whether or not the ColorScheme has been modified from its initial defined state. |
void |
setAxisLineColor(java.awt.Color newAxisLineColor)
Specify the color for the axis lines. |
void |
setBackgroundColor(java.awt.Color newBackgroundColor)
Specifies the color to use for graph background. |
void |
setColumnAxisBackgroundColor(java.awt.Color newBackgroundColor)
Specifies the color to use for column axis background. |
void |
setColumnAxisValueCellBackgroundColor(java.awt.Color newColor)
Specifies the color to use for column axis background. |
void |
setDataElementColors(DataElementColors newdataElementColors)
Sets the Colors used for non-continuous data elements. |
void |
setDataLabelColor(java.awt.Color newDataLabelColor)
Specify the color of data label text. |
void |
setDataTipColor(java.awt.Color newDataTipColor)
Specify the color of data tip text. |
void |
setFloorColor(java.awt.Color newFloorColor)
Specify the color to be used on the chart floor. |
void |
setFrameColor(java.awt.Color newFrameColor)
Specify the frame line color. |
void |
setGridLineColor(java.awt.Color newGridLineColor)
Sets the grid line color. |
void |
setLabelColor(java.awt.Color newLabelColor)
Specify the color of label text. |
void |
setLegendBackgroundColor(java.awt.Color newLegendBackgroundColor)
Specifies the legend background color. |
void |
setMajorTickColor(java.awt.Color newMajorTickColor)
Sets the major tick mark color. |
void |
setMinorTickColor(java.awt.Color newMinorTickColor)
Sets the minor tick mark color. |
void |
setRowAxisBackgroundColor(java.awt.Color newBackgroundColor)
Specifies the color to use for row axis background. |
void |
setRowAxisValueCellBackgroundColor(java.awt.Color newColor)
Specifies the color to use for row axis background. |
void |
setSelectionAccentColor(java.awt.Color newSelectionAccentColor)
Sets the secondary color used to indicate selection. |
void |
setSelectionColor(java.awt.Color newSelectionColor)
Sets the primary color used to indicate selection. |
void |
setShadowColor(java.awt.Color newShadowColor)
Specify the color to be used for shadows. |
void |
setTextFrameColor(java.awt.Color newTextFrameColor)
Specify the color for frame line around the text. |
void |
setTitleFootnoteColor(java.awt.Color newTitleFootnoteColor)
Specify the color of titles and footnotes GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. |
void |
setValueColor(java.awt.Color newValueColor)
Specify the color of value text. |
void |
setWallColor(java.awt.Color newWallColor)
Specify the color to be used for the chart walls. |
void |
setWeekendBandColor(java.awt.Color newColor)
Sets the color applied to Weekend Bands. |
java.lang.String |
toString()
|
Methods inherited from class com.sas.graphics.components.ModelBase |
---|
addPropertyChangeListener, equals, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, hashCode, removePropertyChangeListener, setContainedModel |
Field Detail |
---|
public static final java.lang.String RB_KEY
public static final int SCHEME_AUTUMN
public static final int SCHEME_BRIGHT
public static final int SCHEME_CARNIVAL
public static final int SCHEME_COMMERCE
public static final int SCHEME_GRAYSCALE
public static final int SCHEME_INDUSTRY
public static final int SCHEME_MAGELLAN
public static final int SCHEME_NEON
public static final int SCHEME_OCEAN
public static final int SCHEME_PASTEL
public static final int SCHEME_PICNIC
public static final int SCHEME_PINE
public static final int SCHEME_TERRA
public static final int SCHEME_WHEAT
public static final int SCHEME_WOODLAND
public static final int SCHEME_GANTTCHART
public static final int SCHEME_DECO
public static final int SCHEME_ZUNI
public static final ConstantCollection SCHEME
Constructor Detail |
---|
public ColorScheme()
public ColorScheme(int newName)
Predefined color scheme names are:
newName
- Predefined color scheme name.getName()
,
Method Detail |
---|
protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldProperty, java.lang.Object newProperty)
ModelBase
firePropertyChange
in class ModelBase
propertyName
- the property being changedoldProperty
- the value being changed fromnewProperty
- the value being changed topublic int getName()
Possible return values are:
public boolean isModified()
public java.lang.String toString()
toString
in class java.lang.Object
public void setDataElementColors(DataElementColors newdataElementColors)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newdataElementColors
- Colors for data elements in this style.getDataElementColors()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public DataElementColors getDataElementColors()
setDataElementColors(com.sas.graphics.components.DataElementColors)
public void setBackgroundColor(java.awt.Color newBackgroundColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newBackgroundColor
- contains the background color to be setgetBackgroundColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getBackgroundColor()
setBackgroundColor(java.awt.Color)
public void setRowAxisValueCellBackgroundColor(java.awt.Color newColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newColor
- contains the background color to be setgetRowAxisValueCellBackgroundColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getRowAxisValueCellBackgroundColor()
setBackgroundColor(java.awt.Color)
public void setColumnAxisValueCellBackgroundColor(java.awt.Color newColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newColor
- contains the background color to be setgetColumnAxisValueCellBackgroundColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getColumnAxisValueCellBackgroundColor()
setBackgroundColor(java.awt.Color)
public void setRowAxisBackgroundColor(java.awt.Color newBackgroundColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newBackgroundColor
- contains the background color to be setgetBackgroundColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getRowAxisBackgroundColor()
setBackgroundColor(java.awt.Color)
public void setColumnAxisBackgroundColor(java.awt.Color newBackgroundColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newBackgroundColor
- contains the background color to be setgetBackgroundColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getColumnAxisBackgroundColor()
setBackgroundColor(java.awt.Color)
public void setWallColor(java.awt.Color newWallColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newWallColor
- the color to be used for the chart walls.getWallColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getWallColor()
setWallColor(java.awt.Color)
public void setWeekendBandColor(java.awt.Color newColor) throws java.lang.IllegalArgumentException
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newColor
- the primary color used to Weekend Bands.
java.lang.IllegalArgumentException
getWeekendBandColor()
public java.awt.Color getWeekendBandColor()
setWeekendBandColor(java.awt.Color)
public void setFloorColor(java.awt.Color newFloorColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newFloorColor
- the floor colorgetFloorColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getFloorColor()
setFloorColor(java.awt.Color)
public void setLegendBackgroundColor(java.awt.Color newLegendBackgroundColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newLegendBackgroundColor
- the color to be used on the legend background.getLegendBackgroundColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getLegendBackgroundColor()
setLegendBackgroundColor(java.awt.Color)
public void setTextFrameColor(java.awt.Color newTextFrameColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newTextFrameColor
- color of the frame line around the text.getTextFrameColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getTextFrameColor()
setTextFrameColor(java.awt.Color)
public void setShadowColor(java.awt.Color newShadowColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newShadowColor
- shadow colorgetShadowColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getShadowColor()
setShadowColor(java.awt.Color)
public void setSelectionColor(java.awt.Color newSelectionColor) throws java.lang.IllegalArgumentException
In the case of selected text the selectionColor appears as the text's background color.
The default value is java.awt.SystemColor.textHighlight.
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newSelectionColor
- the primary color used to indicate selection.
java.lang.IllegalArgumentException
getSelectionColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getSelectionColor()
setSelectionColor(Color)
public void setSelectionAccentColor(java.awt.Color newSelectionAccentColor) throws java.lang.IllegalArgumentException
In the case of selected text the selectionAccentColor appears as the text's foreground color.
The default value is java.awt.SystemColor.textHighlightText.
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newSelectionAccentColor
- the secondary color used to indicate selection.
java.lang.IllegalArgumentException
- is thrown for null parameter.getSelectionAccentColor()
public java.awt.Color getSelectionAccentColor()
setSelectionAccentColor(java.awt.Color)
public void setAxisLineColor(java.awt.Color newAxisLineColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newAxisLineColor
- the axis line colorgetAxisLineColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getAxisLineColor()
setAxisLineColor(java.awt.Color)
public void setGridLineColor(java.awt.Color newGridLineColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newGridLineColor
- the grid line colorgetGridLineColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getGridLineColor()
setGridLineColor(java.awt.Color)
public void setMajorTickColor(java.awt.Color newMajorTickColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newMajorTickColor
- the major tick mark colorgetMajorTickColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getMajorTickColor()
setMajorTickColor(java.awt.Color)
public void setMinorTickColor(java.awt.Color newMinorTickColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newMinorTickColor
- the minor tick mark colorgetMinorTickColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getMinorTickColor()
setMinorTickColor(java.awt.Color)
public void setFrameColor(java.awt.Color newFrameColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newFrameColor
- the frame line color for chart and legendgetFrameColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getFrameColor()
setFrameColor(java.awt.Color)
public void setLabelColor(java.awt.Color newLabelColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newLabelColor
- label text colorgetLabelColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getLabelColor()
setLabelColor(java.awt.Color)
public void setValueColor(java.awt.Color newValueColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newValueColor
- the color of value textgetValueColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getValueColor()
setValueColor(java.awt.Color)
public void setDataLabelColor(java.awt.Color newDataLabelColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newDataLabelColor
- the color of data label textgetDataLabelColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getDataLabelColor()
setDataLabelColor(java.awt.Color)
public void setDataTipColor(java.awt.Color newDataTipColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newDataTipColor
- the color of data tip textgetDataTipColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getDataTipColor()
setDataTipColor(java.awt.Color)
public void setTitleFootnoteColor(java.awt.Color newTitleFootnoteColor)
GraphStyle.applyColorScheme(ColorScheme) must be called before this color setting will appear in a GraphStyle. Graph.applyColorScheme(ColorScheme) must be called before this color setting will appear in a Graph.
newTitleFootnoteColor
- the color of titles and footnotesgetTitleFootnoteColor()
,
GraphStyle.applyColorScheme(com.sas.graphics.components.ColorScheme)
public java.awt.Color getTitleFootnoteColor()
setTitleFootnoteColor(java.awt.Color)
public boolean equals(ColorScheme that)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |