util
Class SwingUtils

java.lang.Object
  extended by util.SwingUtils

public class SwingUtils
extends java.lang.Object

SwingUtils provide some extra functions for swing components It should only be accessed in static way

Author:
SebastianWe

Constructor Summary
SwingUtils()
           
 
Method Summary
static void exec(java.awt.Component caller, java.lang.String[] cmd, Language lang)
          Execute a command
static java.awt.Point getCenterPositon(java.awt.Dimension size)
          Get a new start point to center a frame
static void openFile(java.awt.Component caller, java.lang.String path, Language lang)
          Opens a file in the default application
static void openUrl(java.awt.Component caller, java.lang.String url, Language lang)
          Opens a URL in the default browser
static void openWin(java.awt.Component caller, java.lang.String[] cmd, Language lang)
          Opens a program/file/url with the default program
static java.lang.String webDownload(java.awt.Component caller, java.lang.String input, Language lang)
          Download a website
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingUtils

public SwingUtils()
Method Detail

getCenterPositon

public static java.awt.Point getCenterPositon(java.awt.Dimension size)
Get a new start point to center a frame

Parameters:
size - Size of frame
Returns:
Location point

exec

public static void exec(java.awt.Component caller,
                        java.lang.String[] cmd,
                        Language lang)
Execute a command

Parameters:
caller - The calling window
cmd - The command array
lang - Language

openWin

public static void openWin(java.awt.Component caller,
                           java.lang.String[] cmd,
                           Language lang)
Opens a program/file/url with the default program

Parameters:
caller - The calling window
cmd - The command array
lang - Language

openUrl

public static void openUrl(java.awt.Component caller,
                           java.lang.String url,
                           Language lang)
Opens a URL in the default browser

Parameters:
caller - The calling window
url - Webpage URL
lang - Language

webDownload

public static java.lang.String webDownload(java.awt.Component caller,
                                           java.lang.String input,
                                           Language lang)
Download a website

Parameters:
input - URL String
Returns:
Website as String

openFile

public static void openFile(java.awt.Component caller,
                            java.lang.String path,
                            Language lang)
Opens a file in the default application

Parameters:
caller - The calling window
path - path to file
lang - Language