jxl.format
Class Colour

java.lang.Object
  |
  +--jxl.format.Colour
Direct Known Subclasses:
Colour

public class Colour
extends java.lang.Object

Enumeration class which contains the various colours available within the standard Excel colour palette


Field Summary
static Colour AQUA
           
static Colour BLACK
           
private  int blue
          The default "blue" value
static Colour BLUE
           
static Colour BLUE_GREY
           
static Colour BLUE2
           
static Colour BRIGHT_GREEN
           
static Colour BROWN
           
private static Colour[] colours
          The list of internal colours
static Colour CORAL
           
static Colour DARK_BLUE
           
static Colour DARK_BLUE2
           
static Colour DARK_GREEN
           
static Colour DARK_PURPLE
           
static Colour DARK_RED
           
static Colour DARK_RED2
           
static Colour DARK_TEAL
           
static Colour DARK_YELLOW
           
static Colour DEFAULT_BACKGROUND
           
static Colour DEFAULT_BACKGROUND1
           
static Colour GOLD
           
static Colour GRAY_25
           
static Colour GRAY_50
           
static Colour GRAY_80
           
private  int green
          The default "green" value
static Colour GREEN
           
static Colour GREY_25_PERCENT
           
static Colour GREY_40_PERCENT
           
static Colour GREY_50_PERCENT
           
static Colour GREY_80_PERCENT
           
static Colour ICE_BLUE
           
static Colour INDIGO
           
private  boolean initialized
           
static Colour IVORY
           
static Colour LAVENDER
           
static Colour LIGHT_BLUE
           
static Colour LIGHT_GREEN
           
static Colour LIGHT_ORANGE
           
static Colour LIGHT_TURQUOISE
           
static Colour LIGHT_TURQUOISE2
           
static Colour LIME
           
static Colour OCEAN_BLUE
           
static Colour OLIVE_GREEN
           
static Colour ORANGE
           
static Colour PALE_BLUE
           
static Colour PALETTE_BLACK
           
static Colour PERIWINKLE
           
static Colour PINK
           
static Colour PINK2
           
static Colour PLUM
           
static Colour PLUM2
           
private  int red
          The default "red" value
static Colour RED
           
static Colour ROSE
           
static Colour SEA_GREEN
           
static Colour SKY_BLUE
           
private  java.lang.String string
          The display string for the colour.
static Colour TAN
           
static Colour TEAL
           
static Colour TEAL2
           
static Colour TURQOISE2
           
static Colour TURQUOISE
           
static Colour UNKNOWN
           
private  int value
          The internal numerical representation of the colour
static Colour VERY_LIGHT_YELLOW
           
static Colour VIOLET
           
static Colour VIOLET2
           
static Colour WHITE
           
static Colour YELLOW
           
static Colour YELLOW2
           
 
Constructor Summary
protected Colour(int val, java.lang.String s, int r, int g, int b)
          Private constructor
 
Method Summary
static Colour[] getAllColours()
          Returns all available colours - used when generating the default palette
 int getDefaultBlue()
          Gets the default blue content of this colour.
 int getDefaultGreen()
          Gets the default green content of this colour.
 int getDefaultRed()
          Gets the default red content of this colour.
 java.lang.String getDescription()
          Gets the string description for display purposes
static Colour getInternalColour(int val)
          Gets the internal colour from the value
 int getValue()
          Gets the value of this colour.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

value

private int value
The internal numerical representation of the colour

red

private int red
The default "red" value

green

private int green
The default "green" value

blue

private int blue
The default "blue" value

string

private java.lang.String string
The display string for the colour. Used when presenting the format information

initialized

private boolean initialized

colours

private static Colour[] colours
The list of internal colours

UNKNOWN

public static final Colour UNKNOWN

BLACK

public static final Colour BLACK

WHITE

public static final Colour WHITE

DEFAULT_BACKGROUND1

public static final Colour DEFAULT_BACKGROUND1

DEFAULT_BACKGROUND

public static final Colour DEFAULT_BACKGROUND

PALETTE_BLACK

public static final Colour PALETTE_BLACK

RED

public static final Colour RED

BRIGHT_GREEN

public static final Colour BRIGHT_GREEN

BLUE

public static final Colour BLUE

YELLOW

public static final Colour YELLOW

PINK

public static final Colour PINK

TURQUOISE

public static final Colour TURQUOISE

DARK_RED

public static final Colour DARK_RED

GREEN

public static final Colour GREEN

DARK_BLUE

public static final Colour DARK_BLUE

DARK_YELLOW

public static final Colour DARK_YELLOW

VIOLET

public static final Colour VIOLET

TEAL

public static final Colour TEAL

GREY_25_PERCENT

public static final Colour GREY_25_PERCENT

GREY_50_PERCENT

public static final Colour GREY_50_PERCENT

PERIWINKLE

public static final Colour PERIWINKLE

PLUM2

public static final Colour PLUM2

IVORY

public static final Colour IVORY

LIGHT_TURQUOISE2

public static final Colour LIGHT_TURQUOISE2

DARK_PURPLE

public static final Colour DARK_PURPLE

CORAL

public static final Colour CORAL

OCEAN_BLUE

public static final Colour OCEAN_BLUE

ICE_BLUE

public static final Colour ICE_BLUE

DARK_BLUE2

public static final Colour DARK_BLUE2

PINK2

public static final Colour PINK2

YELLOW2

public static final Colour YELLOW2

TURQOISE2

public static final Colour TURQOISE2

VIOLET2

public static final Colour VIOLET2

DARK_RED2

public static final Colour DARK_RED2

TEAL2

public static final Colour TEAL2

BLUE2

public static final Colour BLUE2

SKY_BLUE

public static final Colour SKY_BLUE

LIGHT_TURQUOISE

public static final Colour LIGHT_TURQUOISE

LIGHT_GREEN

public static final Colour LIGHT_GREEN

VERY_LIGHT_YELLOW

public static final Colour VERY_LIGHT_YELLOW

PALE_BLUE

public static final Colour PALE_BLUE

ROSE

public static final Colour ROSE

LAVENDER

public static final Colour LAVENDER

TAN

public static final Colour TAN

LIGHT_BLUE

public static final Colour LIGHT_BLUE

AQUA

public static final Colour AQUA

LIME

public static final Colour LIME

GOLD

public static final Colour GOLD

LIGHT_ORANGE

public static final Colour LIGHT_ORANGE

ORANGE

public static final Colour ORANGE

BLUE_GREY

public static final Colour BLUE_GREY

GREY_40_PERCENT

public static final Colour GREY_40_PERCENT

DARK_TEAL

public static final Colour DARK_TEAL

SEA_GREEN

public static final Colour SEA_GREEN

DARK_GREEN

public static final Colour DARK_GREEN

OLIVE_GREEN

public static final Colour OLIVE_GREEN

BROWN

public static final Colour BROWN

PLUM

public static final Colour PLUM

INDIGO

public static final Colour INDIGO

GREY_80_PERCENT

public static final Colour GREY_80_PERCENT

GRAY_80

public static final Colour GRAY_80

GRAY_50

public static final Colour GRAY_50

GRAY_25

public static final Colour GRAY_25
Constructor Detail

Colour

protected Colour(int val,
                 java.lang.String s,
                 int r,
                 int g,
                 int b)
Private constructor
Parameters:
val -  
s - the display string
r - the default red value
g - the default green value
b - the default blue value
Method Detail

getValue

public int getValue()
Gets the value of this colour. This is the value that is written to the generated Excel file
Returns:
the binary value

getDescription

public java.lang.String getDescription()
Gets the string description for display purposes
Returns:
the string description

getDefaultRed

public int getDefaultRed()
Gets the default red content of this colour. Used when writing the default colour palette
Returns:
the red content of this colour

getDefaultGreen

public int getDefaultGreen()
Gets the default green content of this colour. Used when writing the default colour palette
Returns:
the green content of this colour

getDefaultBlue

public int getDefaultBlue()
Gets the default blue content of this colour. Used when writing the default colour palette
Returns:
the blue content of this colour

getInternalColour

public static Colour getInternalColour(int val)
Gets the internal colour from the value
Parameters:
val -  
Returns:
the colour with that value

getAllColours

public static Colour[] getAllColours()
Returns all available colours - used when generating the default palette
Returns:
all available colours