NOS.gui
Class Decor

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

public class Decor
extends java.lang.Object


Constructor Summary
Decor()
           
 
Method Summary
static void PaintBorder(java.awt.Graphics g, java.awt.Rectangle rect, Style.StyleElement se)
          Draws a border inside the given rectangle using the colour specified in the given style element.
static void PaintGradient(java.awt.Graphics g, java.awt.Rectangle rect, Style.StyleElement se)
          Paint a gradient based on the given style inside the given rectangle.
static void PaintIcon(java.awt.Graphics g, int[] iconpix, int width, int height, java.awt.Rectangle rect, Style.StyleElement se)
          Draws an icon in the centre of the given rectangle using the given style element.
static void PaintIcon(java.awt.Graphics g, int[] iconpix, int width, int height, java.awt.Rectangle rect, Style.StyleElement se, int picColour)
          Draws an icon in the centre of the given rectangle using the given style element.
static void PaintIcon(java.awt.Graphics g, int icon, java.awt.Rectangle rect, Style.StyleElement se)
          Draws an icon in the centre of the given rectangle using the given style element.
static void PaintIcon(java.awt.Graphics g, int icon, java.awt.Rectangle rect, Style.StyleElement se, int picColour)
          Draws an icon in the centre of the given rectangle using the given style element.
static void PaintText(java.awt.Graphics g, java.lang.String text, java.awt.Rectangle rect, Style.StyleElement se)
          Draws a string of text inside the given rectangle formatted and coloured according to the provided style element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Decor

public Decor()
Method Detail

PaintGradient

public static void PaintGradient(java.awt.Graphics g,
                                 java.awt.Rectangle rect,
                                 Style.StyleElement se)
Paint a gradient based on the given style inside the given rectangle.

Parameters:
g - A graphics context to use for painting
rect - A rectangle to draw inside
se - A style element to use

PaintIcon

public static void PaintIcon(java.awt.Graphics g,
                             int icon,
                             java.awt.Rectangle rect,
                             Style.StyleElement se)
Draws an icon in the centre of the given rectangle using the given style element.

Parameters:
g - A graphics context to use for painting
icon - The system icon to be drawn (eg: one of ICON_CLOSE, ICON_MAXIMISE, ICON_RESTORE, ICON_MINIMISE, .. etc ..)
rect - A rectangle to draw inside
se - A style element to use

PaintIcon

public static void PaintIcon(java.awt.Graphics g,
                             int icon,
                             java.awt.Rectangle rect,
                             Style.StyleElement se,
                             int picColour)
Draws an icon in the centre of the given rectangle using the given style element.

Parameters:
g - A graphics context to use for painting
icon - The system icon to be drawn (eg: one of ICON_CLOSE, ICON_MAXIMISE, ICON_RESTORE, ICON_MINIMISE, .. etc ..)
rect - A rectangle to draw inside
se - A style element to use
picColour - An override for the colour provided by the style.

PaintIcon

public static void PaintIcon(java.awt.Graphics g,
                             int[] iconpix,
                             int width,
                             int height,
                             java.awt.Rectangle rect,
                             Style.StyleElement se)
Draws an icon in the centre of the given rectangle using the given style element. This function takes an array of pixels and uses the alpha channel (top 8 bits of ARGB).

Parameters:
g - A graphics context to use for painting
iconpix - a strided array of pixels containing you icon
width - the width of the icon
height - the height of the icon
rect - A rectangle to draw inside
se - A style element to use

PaintIcon

public static void PaintIcon(java.awt.Graphics g,
                             int[] iconpix,
                             int width,
                             int height,
                             java.awt.Rectangle rect,
                             Style.StyleElement se,
                             int picColour)
Draws an icon in the centre of the given rectangle using the given style element. This function takes an array of pixels and uses the alpha channel (top 8 bits of ARGB).

Parameters:
g - A graphics context to use for painting
iconpix - a strided array of pixels containing you icon
width - the width of the icon
height - the height of the icon
rect - A rectangle to draw inside
se - A style element to use
picColour - An override for the colour provided by the style.

PaintBorder

public static void PaintBorder(java.awt.Graphics g,
                               java.awt.Rectangle rect,
                               Style.StyleElement se)
Draws a border inside the given rectangle using the colour specified in the given style element.

Parameters:
g - A graphics context to use for painting
rect - A rectangle to draw inside
se - A style element to use

PaintText

public static void PaintText(java.awt.Graphics g,
                             java.lang.String text,
                             java.awt.Rectangle rect,
                             Style.StyleElement se)
Draws a string of text inside the given rectangle formatted and coloured according to the provided style element.

Parameters:
g - A graphics context to use for painting
text - The string to be drawn
rect - A rectangle to draw inside
se - A style element to use