Class WStandardPalette
- java.lang.Object
-
- eu.webtoolkit.jwt.chart.WStandardPalette
-
- All Implemented Interfaces:
WChartPalette
public class WStandardPalette extends java.lang.Object implements WChartPalette
Standard styling for rendering series in charts.This class provides four standard palettes, each composed of eight different colors (these are recycled at index 8).
The three colored palettes are a variation on those defined at http://www.modernlifeisrubbish.co.uk/article/web-2.0-colour-palette.
The following table lists the background color, and font color of the different palettes:
Neutral Bold Muted GrayScale Gmail blue Mozilla red Ruby on Rails red Gray #1 Shiny silver Flock blue Mozilla blue Gray #2 Interactive action yellow RSS orange Etsy vermillion Gray #3 Qoop mint Techcrunch green Digg blue Gray #4 Digg blue Flickr pink 43 Things gold Gray #5 Shadows grey Newsvine green Writely olive Gray #6 Magnolia Mag.nolia Magnolia Mag.nolia Last.fm crimson Gray #7 RSS orange Rollyo red Basecamp green Gray #8 The border pen is in all cases a gray pen of 0 width, while the stroke pen is a line of width 2 in the background color.
-
-
Constructor Summary
Constructors Constructor Description WStandardPalette(PaletteFlavour flavour)Creates a standard palette of a particular flavour.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WColorcolor(int index)Returns the color for the given index.WPengetBorderPen(int index)Returns a border pen from the palette.WBrushgetBrush(int index)Returns a brush from the palette.WColorgetFontColor(int index)Returns a font color from the palette.WPengetStrokePen(int index)Returns a stroke pen from the palette.
-
-
-
Constructor Detail
-
WStandardPalette
public WStandardPalette(PaletteFlavour flavour)
Creates a standard palette of a particular flavour.
-
-
Method Detail
-
getBrush
public WBrush getBrush(int index)
Description copied from interface:WChartPaletteReturns a brush from the palette.Returns the brush for the style with given index.
- Specified by:
getBrushin interfaceWChartPalette
-
getBorderPen
public WPen getBorderPen(int index)
Description copied from interface:WChartPaletteReturns a border pen from the palette.Returns the pen for stroking borders around an area filled using the brush at the same index.
- Specified by:
getBorderPenin interfaceWChartPalette- See Also:
WChartPalette.getStrokePen(int index),WChartPalette.getBrush(int index)
-
getStrokePen
public WPen getStrokePen(int index)
Description copied from interface:WChartPaletteReturns a stroke pen from the palette.Returns the pen for stroking lines for the style with given index.
- Specified by:
getStrokePenin interfaceWChartPalette- See Also:
WChartPalette.getStrokePen(int index)
-
getFontColor
public WColor getFontColor(int index)
Description copied from interface:WChartPaletteReturns a font color from the palette.Returns a font color suitable for rendering text in the area filled with the brush at the same index.
- Specified by:
getFontColorin interfaceWChartPalette- See Also:
WChartPalette.getBrush(int index)
-
color
public WColor color(int index)
Returns the color for the given index.
-
-