NOS.gui
Class Style

java.lang.Object
  extended by NOS.gui.Style

public class Style
extends java.lang.Object


Nested Class Summary
 class Style.StyleElement
           
 
Field Summary
static java.awt.Font arial
           
 java.lang.String author
           
static int BEVEL_1
           
static int BEVEL_2
           
static int BEVEL_FLAT
           
static int BEVEL_RAISED
           
static int BEVEL_SUNKEN
           
 int bevelWidth
           
 int borderColour
           
 int borderWidth
           
static java.util.Hashtable colours
           
 java.lang.String comments
           
 java.lang.String credits
           
 java.lang.String date
           
 Style.StyleElement defaultStyleElement
           
 int frameWidth
           
 java.awt.Font globalFont
           
 int globalFontHeight
           
 java.lang.String globalFontName
           
 int globalFontWeight
           
 java.lang.String globalFontWeightStr
           
 int handleWidth
           
static int ICON_CIRCLE
           
static int ICON_CLOSE
           
static int ICON_DIAMOND
           
static int ICON_DOWN
           
static int ICON_LEFT
           
static int ICON_LOAD
           
static int ICON_MAXIMISE
           
static int ICON_MINIMISE
           
static int ICON_NONE
           
static int ICON_RESTORE
           
static int ICON_RIGHT
           
static int ICON_SAVE
           
static int ICON_UP
           
static int JUSTIFY_CENTRE
           
static int JUSTIFY_LEFT
           
static int JUSTIFY_RIGHT
           
 java.lang.String name
           
static int TYPE_CROSSDIAGONAL
           
static int TYPE_DIAGONAL
           
static int TYPE_ELLIPTIC
           
static int TYPE_HORIZONTAL
           
static int TYPE_PIPECROSS
           
static int TYPE_PYRAMID
           
static int TYPE_RECTANGLE
           
static int TYPE_SOLID
           
static int TYPE_VERTICAL
           
 
Constructor Summary
Style(NOSFile f)
          Creates a new Style object.
 
Method Summary
 Style.StyleElement getStyleElement(java.lang.String name)
          Get a named style element from this Style.
static int readColour(Settings s, java.lang.String name, int def)
          Read a colour from a Settings object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

colours

public static java.util.Hashtable colours

TYPE_HORIZONTAL

public static final int TYPE_HORIZONTAL
See Also:
Constant Field Values

TYPE_VERTICAL

public static final int TYPE_VERTICAL
See Also:
Constant Field Values

TYPE_CROSSDIAGONAL

public static final int TYPE_CROSSDIAGONAL
See Also:
Constant Field Values

TYPE_PIPECROSS

public static final int TYPE_PIPECROSS
See Also:
Constant Field Values

TYPE_ELLIPTIC

public static final int TYPE_ELLIPTIC
See Also:
Constant Field Values

TYPE_RECTANGLE

public static final int TYPE_RECTANGLE
See Also:
Constant Field Values

TYPE_PYRAMID

public static final int TYPE_PYRAMID
See Also:
Constant Field Values

TYPE_SOLID

public static final int TYPE_SOLID
See Also:
Constant Field Values

TYPE_DIAGONAL

public static final int TYPE_DIAGONAL
See Also:
Constant Field Values

BEVEL_FLAT

public static final int BEVEL_FLAT
See Also:
Constant Field Values

BEVEL_SUNKEN

public static final int BEVEL_SUNKEN
See Also:
Constant Field Values

BEVEL_RAISED

public static final int BEVEL_RAISED
See Also:
Constant Field Values

BEVEL_1

public static final int BEVEL_1
See Also:
Constant Field Values

BEVEL_2

public static final int BEVEL_2
See Also:
Constant Field Values

JUSTIFY_LEFT

public static final int JUSTIFY_LEFT
See Also:
Constant Field Values

JUSTIFY_RIGHT

public static final int JUSTIFY_RIGHT
See Also:
Constant Field Values

JUSTIFY_CENTRE

public static final int JUSTIFY_CENTRE
See Also:
Constant Field Values

ICON_NONE

public static final int ICON_NONE
See Also:
Constant Field Values

ICON_CLOSE

public static final int ICON_CLOSE
See Also:
Constant Field Values

ICON_MAXIMISE

public static final int ICON_MAXIMISE
See Also:
Constant Field Values

ICON_MINIMISE

public static final int ICON_MINIMISE
See Also:
Constant Field Values

ICON_RESTORE

public static final int ICON_RESTORE
See Also:
Constant Field Values

ICON_UP

public static final int ICON_UP
See Also:
Constant Field Values

ICON_DOWN

public static final int ICON_DOWN
See Also:
Constant Field Values

ICON_LEFT

public static final int ICON_LEFT
See Also:
Constant Field Values

ICON_RIGHT

public static final int ICON_RIGHT
See Also:
Constant Field Values

ICON_SAVE

public static final int ICON_SAVE
See Also:
Constant Field Values

ICON_LOAD

public static final int ICON_LOAD
See Also:
Constant Field Values

ICON_DIAMOND

public static final int ICON_DIAMOND
See Also:
Constant Field Values

ICON_CIRCLE

public static final int ICON_CIRCLE
See Also:
Constant Field Values

arial

public static final java.awt.Font arial

name

public java.lang.String name

author

public java.lang.String author

date

public java.lang.String date

credits

public java.lang.String credits

comments

public java.lang.String comments

borderWidth

public int borderWidth

borderColour

public int borderColour

bevelWidth

public int bevelWidth

frameWidth

public int frameWidth

handleWidth

public int handleWidth

globalFontName

public java.lang.String globalFontName

globalFontHeight

public int globalFontHeight

globalFontWeight

public int globalFontWeight

globalFontWeightStr

public java.lang.String globalFontWeightStr

globalFont

public java.awt.Font globalFont

defaultStyleElement

public Style.StyleElement defaultStyleElement
Constructor Detail

Style

public Style(NOSFile f)
Creates a new Style object.

Parameters:
f - The file from which to read the style information
Method Detail

getStyleElement

public Style.StyleElement getStyleElement(java.lang.String name)
Get a named style element from this Style.

Parameters:
name - The name of the element (eg: "window.button.focus")
Returns:
The StyleElement for the name, or null if one couldn't be found.

readColour

public static int readColour(Settings s,
                             java.lang.String name,
                             int def)
Read a colour from a Settings object.

Parameters:
s - The Settings object
name - The name of the setting
def - The default colour
Returns:
The colour read.