nl.coderight.jazz.util
Class JazzUtil

java.lang.Object
  extended by nl.coderight.jazz.util.JazzUtil

public final class JazzUtil
extends Object

Provides various helper methods.


Nested Class Summary
static class JazzUtil.FocusBorder
           
static class JazzUtil.Mnemonic
          Class that represents a mnemonic.
static class JazzUtil.OperatingSystem
          Enumeration of possible operating systems.
 
Constructor Summary
JazzUtil()
           
 
Method Summary
static KeyStroke createAccelerator(String shortcut)
          Returns a KeyStroke from the given shortcut.
static JazzUtil.Mnemonic createMnemonic(String text)
          Used by the framework to create a mnemonic from text.
static Proxy detectProxyServer()
          Automatically detect proxy server.
static JazzUtil.OperatingSystem getOperatingSystem()
          Returns the operating system currently running on.
static Proxy getProxyServer()
          Returns the current proxy server.
static Object getResource(String name)
          Returns a resource as Object.
static Icon getResourceAsIcon(String name)
          Returns a resource as Icon.
static Image getResourceAsImage(String name)
          Returns a resource as Image.
static Dimension getScreenSize()
          Returns the size of the screen.
static String getSystemInfo()
          Returns system info: Jazz version, license, Java version, OS, processor(s), memory.
static String MD5Hash(String string)
          Returns a MD5 hash.
static void playSound(String name)
          Play a sound.
static void setProxyServer(String host, String port)
          Manually sets a proxy server.
static void setProxyServer(String host, String port, String userName, char[] password)
          Manually sets a proxy server.
static String translate(String key)
          Translates an i18n key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JazzUtil

public JazzUtil()
Method Detail

getOperatingSystem

public static JazzUtil.OperatingSystem getOperatingSystem()
Returns the operating system currently running on.


getSystemInfo

public static String getSystemInfo()
Returns system info: Jazz version, license, Java version, OS, processor(s), memory.


detectProxyServer

public static Proxy detectProxyServer()
Automatically detect proxy server.


getProxyServer

public static Proxy getProxyServer()
Returns the current proxy server.


setProxyServer

public static void setProxyServer(String host,
                                  String port)
Manually sets a proxy server.


setProxyServer

public static void setProxyServer(String host,
                                  String port,
                                  String userName,
                                  char[] password)
Manually sets a proxy server.


translate

public static String translate(String key)
Translates an i18n key.

Parameters:
key - i18n key
Returns:
translation
See Also:
ResourceManager.translate(String)

getResource

public static Object getResource(String name)
Returns a resource as Object.

See Also:
ResourceManager.getResource(String)

getResourceAsIcon

public static Icon getResourceAsIcon(String name)
Returns a resource as Icon.

See Also:
ResourceManager.getResourceAsIcon(String)

getResourceAsImage

public static Image getResourceAsImage(String name)
Returns a resource as Image.

See Also:
ResourceManager.getResourceAsImage(String)

getScreenSize

public static Dimension getScreenSize()
Returns the size of the screen.

See Also:
Toolkit.getScreenSize()

playSound

public static void playSound(String name)
Play a sound.

See Also:
AudioSystem

MD5Hash

public static String MD5Hash(String string)
Returns a MD5 hash.


createAccelerator

public static KeyStroke createAccelerator(String shortcut)
Returns a KeyStroke from the given shortcut.


createMnemonic

public static JazzUtil.Mnemonic createMnemonic(String text)
Used by the framework to create a mnemonic from text.



Copyright 2010 CodeRight, All rights reserved.