|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.beamertool.util.Utils
public class Utils
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static String |
camelToHuman(String name)
Converts a camel-notated string to a more human readable format. |
static String |
colorToHTML(Color aColor)
Converts a give color to it's html hex-notated counterpart. |
static String |
getDateAsISO8601(Date date)
Formats a string ISO8601 compliant. |
static Collection<gnu.io.CommPortIdentifier> |
getPorts()
Lists all availible com ports. |
static BufferedImage |
getWindowIcon()
Returns the beamer-tool icon. |
static URL |
loadFramClassPath(String fileName)
Tries to load a given file from the current classpath. |
static void |
logStackTrace(Logger logger,
Throwable t)
Write the complete stacktrace to the logger. |
static void |
openURLinBrowser(URL url)
Opens the given URL in an external browser. |
static void |
prepareLogger(Logger aLogger)
Prepares the given logger according to the system proptery "beamer-tool.debug". |
static void |
prepareSystem()
Sets additional system properties |
static String |
randomString(int length)
Returns a random string with the given length. |
static void |
setIconToFrame(Window aWindow)
Sets the beamer-tool icon to the given window. |
static String |
stringFirstUppercase(String value)
Converts the first character of a string to uppercase and the rest to lowercase. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static String camelToHuman(String name)
name - the camel-noted string to convert
public static String colorToHTML(Color aColor)
aColor - the color to convert
public static String getDateAsISO8601(Date date)
date - the date to format
public static Collection<gnu.io.CommPortIdentifier> getPorts()
public static BufferedImage getWindowIcon()
throws IOException
IOException - if an IO-Error occurspublic static URL loadFramClassPath(String fileName)
fileName - -
the filename for the search
public static void logStackTrace(Logger logger,
Throwable t)
logger - the logger to log tot - source of the stacktrace
public static void openURLinBrowser(URL url)
throws IOException,
URISyntaxException
url -
URISyntaxException
IOExceptionpublic static void prepareLogger(Logger aLogger)
aLogger - the logger to set uppublic static void prepareSystem()
public static String randomString(int length)
length - the length of the random string
public static void setIconToFrame(Window aWindow)
aWindow - the window to set the icon topublic static String stringFirstUppercase(String value)
value - the string to convert
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||