com.jstatcom.component
Class CompSettings
- java.lang.Object
-
- com.jstatcom.component.CompSettings
-
public final class CompSettings extends java.lang.ObjectThis class contains some publicly accessible fields that specify settings for components used throughout JStatCom.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.awt.ColorerrorBackgroundDefault background color if error happened.static java.awt.FontsmallFontDefaultDefault for small font.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voiddispatchEvent(java.lang.Runnable runner)Dispatches event in Swing EDT.static java.lang.StringgetDateString()Gets a string with the formatted date and time.static java.text.DateFormatgetDefaultDateFormat()Gets a new instance of a default date formatter with the pattern"EEE, d MMM yyyy HH:mm:ss".static java.text.DateFormatgetSimpleDateFormat()Gets a new instance of a simple date formatter with the pattern"HH:mm:ss".static voidsyncWithSwing(java.lang.Runnable runner)Later-Invokes the operation defined inrunnerwithin the SWING event dispatching thread.
-
-
-
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 inrunnerwithin the SWING event dispatching thread. If this method is already called within the event dispatching thread, then simplyrunner.runis called.O OtherwiseSwingUtilities.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
-
-
DMelt 3.0 © DataMelt by jWork.ORG