|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.shaker.dwu.ToolBox
This class contains different useful static methods.
Field Summary | |
(package private) static java.io.File |
DWU_DIR
File representation of DWU`s path. |
(package private) static java.lang.String |
DWU_PATH
DWU`s output folder, located in ~/.docwhatsup |
private static java.lang.String |
FILE_SEP
OS depended path separator |
private static java.util.ResourceBundle |
lang
Localization ressources |
(package private) static java.io.File |
LOG_FILE
|
Constructor Summary | |
private |
ToolBox()
Invisible constructor. |
Method Summary | |
(package private) static void |
checkUp()
This method create the settings folder and ships generic, default settings at the very first startup. |
(package private) static boolean |
existsLogFile()
Returns true, if there`s an existing log file in the dwu folder. |
(package private) static java.lang.String |
getLogText()
Returns the content of the logfile or an empty string, if not existing. |
(package private) static java.lang.String[] |
getSortetSysPropArray()
Returns a alphabetically (key-) sorted array of system properties. |
(package private) static void |
killLogFile()
Deletes the local dwu logfile. |
(package private) static java.lang.String |
localize(java.lang.String key)
Localizes a given dictionary key into a readable string. |
(package private) static void |
logException(java.lang.Exception exception)
Logs a string in a DWU`s LogFile ($DWU_PATH/error.log). |
(package private) static void |
setLocale(java.util.Locale locale)
Sets a new Locale and creates a new ResourceBundle. |
(package private) static void |
setSmartSize(java.awt.Window window,
int width,
int height)
Sets the size of a window and centers it on screen. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final java.lang.String FILE_SEP
static final java.lang.String DWU_PATH
static final java.io.File DWU_DIR
static final java.io.File LOG_FILE
private static java.util.ResourceBundle lang
Constructor Detail |
private ToolBox()
Method Detail |
static void checkUp()
static void logException(java.lang.Exception exception)
exception
- the exception objectif you want to know, where DWU_PATH is located
static boolean existsLogFile()
static java.lang.String getLogText()
static void killLogFile()
static java.lang.String[] getSortetSysPropArray()
static void setLocale(java.util.Locale locale)
locale
- the new localestatic java.lang.String localize(java.lang.String key)
key
- a dictionary keystatic void setSmartSize(java.awt.Window window, int width, int height)
window
- the window object (a dialog, frame ...)width
- the preferred widthheight
- the preferred height
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |