jhomenet.gui.util
Class UIHelper

java.lang.Object
  extended by jhomenet.gui.util.UIHelper

public final class UIHelper
extends java.lang.Object

Version:
$Revision$ Filename: $Source$ Description:
Author:
$Author$

Method Summary
static void centerOnScreen(java.awt.Component component)
           
static javax.swing.JButton createButton(java.lang.String text)
          Create a button with the given text.
static javax.swing.JButton createButton(java.lang.String text, java.lang.String icon)
          Create a button with the given text and the given icon name.
static javax.swing.JButton createButton(java.lang.String text, java.lang.String icon, boolean flat)
          Create a button with the given text and the given icon name.
protected static javax.swing.ImageIcon readImageIcon(java.lang.String filename)
          Create an image given the image filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

centerOnScreen

public static void centerOnScreen(java.awt.Component component)

createButton

public static javax.swing.JButton createButton(java.lang.String text)
Create a button with the given text.

Parameters:
text - The title of the button
Returns:
The new button

createButton

public static javax.swing.JButton createButton(java.lang.String text,
                                               java.lang.String icon)
Create a button with the given text and the given icon name.

Parameters:
text - The title of the button
icon - The icon associated with the button. The icons are assumed to be located in the images/ folder.
Returns:
The new button

createButton

public static javax.swing.JButton createButton(java.lang.String text,
                                               java.lang.String icon,
                                               boolean flat)
Create a button with the given text and the given icon name.

Parameters:
text - The title of the button
icon - The icon associated with the button. The icons are assumed to be located in the images/ folder.
flat - If true, the button is flat
Returns:
The new button

readImageIcon

protected static javax.swing.ImageIcon readImageIcon(java.lang.String filename)
Create an image given the image filename.

Parameters:
filename - The name of the image file
Returns:
An image icon


Copyright © 2004-2005 David Irwin. All Rights Reserved.