com.jstatcom.component
Class CompSettings

java.lang.Object
  extended by com.jstatcom.component.CompSettings

public final class CompSettings
extends java.lang.Object

This class contains some publicly accessible fields that specify settings for components used throughout JStatCom.

Author:
Markus Kraetzig

Field Summary
static java.awt.Color errorBackground
          Default background color if error happened.
static java.awt.Font smallFontDefault
          Default for small font.
 
Method Summary
static void dispatchEvent(java.lang.Runnable runner)
          Dispatches event in Swing EDT.
static java.lang.String getDateString()
          Gets a string with the formatted date and time.
static java.text.DateFormat getDefaultDateFormat()
          Gets a new instance of a default date formatter with the pattern "EEE, d MMM yyyy HH:mm:ss".
static java.text.DateFormat getSimpleDateFormat()
          Gets a new instance of a simple date formatter with the pattern "HH:mm:ss".
static void syncWithSwing(java.lang.Runnable runner)
          Later-Invokes the operation defined in runner within the SWING event dispatching thread.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorBackground

public static final java.awt.Color errorBackground
Default background color if error happened.


smallFontDefault

public static final java.awt.Font smallFontDefault
Default for small font.

Method Detail

syncWithSwing

public static void syncWithSwing(java.lang.Runnable runner)
Later-Invokes the operation defined in runner within the SWING event dispatching thread. If this method is already called within the event dispatching thread, then simply runner.run is called.O Otherwise SwingUtilities.invokeLater(runner) is used.

Parameters:
runner - wrapper for the method to be called within the SWING event dispatching thread
Throws:
java.lang.IllegalArgumentException - if (runner == null)

dispatchEvent

public static void dispatchEvent(java.lang.Runnable runner)
Dispatches event in Swing EDT. It first waits 2000 millis for the action to return, then cancels and uses invokeLater.

Parameters:
runner -
Throws:
java.lang.IllegalArgumentException - if (runner == null)

getDateString

public static java.lang.String getDateString()
Gets a string with the formatted date and time.

Returns:
formatted date string

getDefaultDateFormat

public static java.text.DateFormat getDefaultDateFormat()
Gets a new instance of a default date formatter with the pattern "EEE, d MMM yyyy HH:mm:ss".

Returns:
date format

getSimpleDateFormat

public static java.text.DateFormat getSimpleDateFormat()
Gets a new instance of a simple date formatter with the pattern "HH:mm:ss".

Returns:
date format