org.hardtokenmgmt.core.ui
Class UIHelper

java.lang.Object
  extended by org.hardtokenmgmt.core.ui.UIHelper

public class UIHelper
extends java.lang.Object

Class used for image and language resource handling Uses the global and administrator setting interfaces to retrieve the localization.

Version:
$Id$
Author:
Philip Vendil 2006-aug-28

Constructor Summary
UIHelper()
           
 
Method Summary
static int getAppHeight()
           
static int getAppWidth()
           
static java.awt.Color getColor(java.lang.String key)
          Method that reads a property value of 0xNNNNNN were N is a number and returns a Color object
static javax.swing.JTextField getCopyPasteLabel()
          Generates a label that can be copy and pasted Is built upon a JTextField instead of a JLabel
static java.awt.Color getErrorMsgForeground()
           
static java.awt.Font getFont(java.lang.String key)
          Method that reads a property value of the format ;; Ex: Arial;BOLD;12 and returns a Font object
static javax.swing.Icon getImage(java.lang.String filename)
          Method fetching an image from the resources/images directory
static java.awt.Font getLabelFontBold()
           
static javax.swing.Icon getLogo()
           
static java.awt.Color getNormalMsgForeground()
           
static java.lang.String getText(java.lang.String key)
          Method that internationalizes the resource files in the UI.
static java.awt.Font getTitleFont()
           
static java.awt.Color getWarnMsgForeground()
           
static void setTheme()
          Method that sets the application theme from a the theme configuration file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIHelper

public UIHelper()
Method Detail

getText

public static java.lang.String getText(java.lang.String key)
Method that internationalizes the resource files in the UI. The static method first looks up in the default localt resource before looking it up in the english resource file

Parameters:
key -

getAppHeight

public static int getAppHeight()

getAppWidth

public static int getAppWidth()

getLogo

public static javax.swing.Icon getLogo()

setTheme

public static void setTheme()
Method that sets the application theme from a the theme configuration file


getLabelFontBold

public static java.awt.Font getLabelFontBold()

getTitleFont

public static java.awt.Font getTitleFont()

getNormalMsgForeground

public static java.awt.Color getNormalMsgForeground()

getErrorMsgForeground

public static java.awt.Color getErrorMsgForeground()

getWarnMsgForeground

public static java.awt.Color getWarnMsgForeground()

getColor

public static java.awt.Color getColor(java.lang.String key)
Method that reads a property value of 0xNNNNNN were N is a number and returns a Color object


getFont

public static java.awt.Font getFont(java.lang.String key)
Method that reads a property value of the format ;; Ex: Arial;BOLD;12 and returns a Font object


getImage

public static javax.swing.Icon getImage(java.lang.String filename)
Method fetching an image from the resources/images directory

Parameters:
filename - (without path)
Returns:
a Icon or null if the image couldn't be found

getCopyPasteLabel

public static javax.swing.JTextField getCopyPasteLabel()
Generates a label that can be copy and pasted Is built upon a JTextField instead of a JLabel