net.sourceforge.mlf.metouia.borders
Class MetouiaBorderUtilities

java.lang.Object
  extended bynet.sourceforge.mlf.metouia.borders.MetouiaBorderUtilities

public class MetouiaBorderUtilities
extends java.lang.Object

This is a utility class for painting simple 3d borders, and providding common ones.


Constructor Summary
MetouiaBorderUtilities()
           
 
Method Summary
static void drawBevel3DBorder(java.awt.Graphics g, int x, int y, int w, int h, java.awt.Color highlight, java.awt.Color shadow, java.awt.Color innerHighlight, java.awt.Color innerShadow)
          Draws a bevel 3d border with the specified colors.
static void drawDisabledBorder(java.awt.Graphics g, int x, int y, int w, int h)
          Draws a disabled simple 3d border.
static void drawSimple3DBorder(java.awt.Graphics g, int x, int y, int w, int h, java.awt.Color highlight, java.awt.Color shadow)
          Draws a simple 3d border with specified colors.
static javax.swing.border.Border getButtonBorder()
          Gets a border instance for a button.
static javax.swing.border.Border getDesktopIconBorder()
          Gets a border instance for a desktop icon.
static javax.swing.border.Border getTextBorder()
          Gets a border instance for a text component.
static javax.swing.border.Border getTextFieldBorder()
          Gets a border instance for a text field component.
static javax.swing.border.Border getToggleButtonBorder()
          Gets a border instance for a toggle button.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetouiaBorderUtilities

public MetouiaBorderUtilities()
Method Detail

drawDisabledBorder

public static void drawDisabledBorder(java.awt.Graphics g,
                                      int x,
                                      int y,
                                      int w,
                                      int h)
Draws a disabled simple 3d border.

Parameters:
g - The graphics context.
x - The x coordinate of the top left corner.
y - The y coordinate of the top left corner.
w - The width.
h - The height.

drawSimple3DBorder

public static final void drawSimple3DBorder(java.awt.Graphics g,
                                            int x,
                                            int y,
                                            int w,
                                            int h,
                                            java.awt.Color highlight,
                                            java.awt.Color shadow)
Draws a simple 3d border with specified colors.

Parameters:
g - The graphics context.
x - The x coordinate of the top left corner.
y - The y coordinate of the top left corner.
w - The width.
h - The height.
highlight - The highlight color to use.
shadow - The shadow color to use.

drawBevel3DBorder

public static final void drawBevel3DBorder(java.awt.Graphics g,
                                           int x,
                                           int y,
                                           int w,
                                           int h,
                                           java.awt.Color highlight,
                                           java.awt.Color shadow,
                                           java.awt.Color innerHighlight,
                                           java.awt.Color innerShadow)
Draws a bevel 3d border with the specified colors.

Parameters:
g - The graphics context.
x - The x coordinate of the top left corner.
y - The y coordinate of the top left corner.
w - The width.
h - The height.
highlight - The highlight color to use.
shadow - The shadow color to use.
innerHighlight - The inner highlight color to use.
innerShadow - The inner shadow color to use.

getButtonBorder

public static javax.swing.border.Border getButtonBorder()
Gets a border instance for a button. The border instance is cached for future use.

Returns:
A border instance for a button.

getTextBorder

public static javax.swing.border.Border getTextBorder()
Gets a border instance for a text component. The border instance is cached for future use.

Returns:
A border instance for a text component.

getTextFieldBorder

public static javax.swing.border.Border getTextFieldBorder()
Gets a border instance for a text field component. The border instance is cached for future use.

Returns:
A border instance for a text field component.

getToggleButtonBorder

public static javax.swing.border.Border getToggleButtonBorder()
Gets a border instance for a toggle button. The border instance is cached for future use.

Returns:
A border instance for a toggle button.

getDesktopIconBorder

public static javax.swing.border.Border getDesktopIconBorder()
Gets a border instance for a desktop icon.

Returns:
A border instance for a desktop icon.