Summ:  Fields Constr. Methods    Details:  Fields Constr. Methods      Class:  Prev Next
com.artfulbits.aiCharts.Base
Class ChartPalette

java.lang.Object com.artfulbits.aiCharts.Base.ChartPalette

Declaration: public final class ChartPalette extends Object

 

Represents chart palette class. Palette provides set of colors used to draw each series or each series' segment depending on corresponding chart type.

 

Since: 1.0

 

 

Fields Summary
static ChartPalette Grayscale
    
Presents predefined Grayscale palette initialized with following set of colors: 0xFFA3A3A3, 0xFF7A7A7A, 0xFF282828, 0xFF484848.
static ChartPalette MSOffice
    
Presents predefined MSOffice palette initialized with following set of colors: 0xFF9999FF, 0xFF993366, 0xFFFFFFCC.
static ChartPalette OpenOffice
    
Presents predefined OpenOffice palette initialized with following set of colors: 0xFF004586, 0xFFFF420E, 0xFFFFD320, 0xFF579D1C, 0xFF7E0021, 0xFF7E0021.
static ChartPalette Rainbow
    
Presents predefined Rainbow palette initialized with following set of colors: 0xFFFF0000, 0xFFFFA500, 0xFFFFFF00, 0xFF008000, 0xFF0000FF, 0xFF0000FF, 0xFFEE82EE.

 

 

Constructors Summary
ChartPalette(int[] colors)
    
Initializes a new instance of ChartPalette class with specified array of colors.

 

 

Methods Summary
int getColor(int index)
    
Gets color at specified index.
int getSize()
    
Gets number of colors in palette.
int[] getValues()
    
Gets colors of palette.
static ChartPalette rangePalette(int firstColor, int lastColor, int paletteSize)
    
Represents range palette builder.

 

Methods inherited from class: java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

 

 

 

Rainbow

 

public static final ChartPalette Rainbow

 

Presents predefined Rainbow palette initialized with following set of colors: 0xFFFF0000, 0xFFFFA500, 0xFFFFFF00, 0xFF008000, 0xFF0000FF, 0xFF0000FF, 0xFFEE82EE.

 

Since: 1.0

 

 

 

OpenOffice

 

public static final ChartPalette OpenOffice

 

Presents predefined OpenOffice palette initialized with following set of colors: 0xFF004586, 0xFFFF420E, 0xFFFFD320, 0xFF579D1C, 0xFF7E0021, 0xFF7E0021.

 

Since: 1.0

 

 

 

MSOffice

 

public static final ChartPalette MSOffice

 

Presents predefined MSOffice palette initialized with following set of colors: 0xFF9999FF, 0xFF993366, 0xFFFFFFCC.

 

Since: 1.0

 

 

 

Grayscale

 

public static final ChartPalette Grayscale

 

Presents predefined Grayscale palette initialized with following set of colors: 0xFFA3A3A3, 0xFF7A7A7A, 0xFF282828, 0xFF484848.

 

Since: 1.0

 

 

 

 

ChartPalette

 

public ChartPalette( int[] colors)

 

Initializes a new instance of ChartPalette class with specified array of colors.

 

Parameters:
colors-
color values.

 

Since: 1.0

 

 

 

 

rangePalette

 

public static ChartPalette rangePalette( int firstColor,
int lastColor,
int paletteSize)

 

Represents range palette builder. Handy method to create gradient-flowing palette types.

 

Parameters:
firstColor-
starting palette color.
lastColor-
ending palette color.
paletteSize-
size of palette.
Returns:
instance of ChartPalette

 

Since: 1.0

 

 

 

getColor

 

public int getColor( int index)

 

Gets color at specified index.

 

Parameters:
index-
index of color.
Returns:
color value.

 

Since: 1.0

 

 

 

getSize

 

public int getSize( )

 

Gets number of colors in palette.

 

Returns:
zero-based quantity of colors in palette.

 

Since: 1.0

 

 

 

getValues

 

public int[] getValues( )

 

Gets colors of palette.

 

Returns:
array of color-representing integers.

 

Since: 1.0

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.