|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.greenstone.gs3client.ColourCombo
public class ColourCombo
Background and selection color combinations for the Java-Client's interface. Stores Greenstone, Fedora and default colour combinations and has methods for converting colours of items.
Nested Class Summary | |
---|---|
static interface |
ColourCombo.ColourChangeable
Interface ColourChangeable defines one method, changeUIColour(), which classes whose user-interface colours can change may implement. |
Field Summary | |
---|---|
(package private) static java.awt.Color |
background
Fixed background colour for textareas, editorPanes (html) |
(package private) static java.awt.Color |
blue
Fedora dark background colour |
protected static ColourCombo |
current
The colour combination currently being used in the interface |
java.awt.Color |
dark
background colours for panels, labels |
static ColourCombo |
defaultColors
System default greys |
static ColourCombo |
fedoraColors
Fedora's colour combinations of blue |
(package private) static java.awt.Color |
green
Greenstone dark background colour |
static ColourCombo |
greenstoneColors
Greenstone greens |
(package private) static java.awt.Color |
grey
Default background colour |
java.awt.Color |
light
background colours for comboboxes, lists, textfields, textareas |
(package private) static java.awt.Color |
lightBlue
Fedora light background colour |
(package private) static java.awt.Color |
lightGreen
Greenstone light background colour |
(package private) static java.awt.Color |
transparent
Greenstone transparent background colour. |
(package private) static java.awt.Color |
yellow
Selection colour for Fedora and Greenstone |
Constructor Summary | |
---|---|
ColourCombo(java.awt.Color dark,
java.awt.Color light)
Constructor to create a ColourCombo combination of colours |
Method Summary | |
---|---|
static void |
changeAncestorColor(java.awt.Component c)
Given a component, sets its ancestors to the dark colour setting. |
static void |
changeColor(java.awt.Component c)
Given a Component, sets its background colours to a dark or light colour setting as appropriate. |
static void |
changeColor(java.awt.Component[] leafComponents)
Given an array of components, sets their background colours to a dark or light colour setting as appropriate. |
static ColourCombo |
getCurrentCombo()
|
protected static boolean |
isLightColor(java.awt.Component c)
|
static void |
setColour(int DL)
Sets the active colour combination based on the value of DL. |
static void |
setCurrentCombo(ColourCombo c)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final java.awt.Color transparent
static final java.awt.Color green
static final java.awt.Color lightGreen
static final java.awt.Color blue
static final java.awt.Color lightBlue
static final java.awt.Color yellow
static final java.awt.Color grey
static final java.awt.Color background
public final java.awt.Color dark
public final java.awt.Color light
public static final ColourCombo defaultColors
public static final ColourCombo greenstoneColors
public static final ColourCombo fedoraColors
protected static ColourCombo current
Constructor Detail |
---|
public ColourCombo(java.awt.Color dark, java.awt.Color light)
dark
- is the colour to set JPanels to.light
- is the colour to set comboboxes, lists and non-editable
textfields to.Method Detail |
---|
public static ColourCombo getCurrentCombo()
public static void setCurrentCombo(ColourCombo c)
public static void setColour(int DL)
DL
- represents the current digital library. Values can be
GS3JavaClient.GREENSTONE, GS3JavaClient.FEDORA, GS3JavaClient.SELECT.
Anything else and it defaults to GS3JavaClient.SELECT as well.protected static boolean isLightColor(java.awt.Component c)
c
- is the Component for which it is to be determined whether it
should be a lighter or darker colour.
public static void changeColor(java.awt.Component[] leafComponents)
leafComponents
- is the array of components whose background
colours are to change.public static void changeColor(java.awt.Component c)
c
- is the component whose background colours are to change.public static void changeAncestorColor(java.awt.Component c)
c
- is the component whose ancestors' background colours are
to be set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |