public class GUIFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BASE_FONT_SIZE |
static java.lang.String |
FONTFAMILY |
static java.lang.String |
FONTFAMILY_MONOSPACED |
Constructor and Description |
---|
GUIFactory() |
Modifier and Type | Method and Description |
---|---|
static javax.swing.JDialog |
createAndShowLongActionDialog(javax.swing.JFrame owner,
java.lang.String title,
boolean modal)
Creates a visible alive dialog centered around frame (if non null) with
title title
ALWAYS CALL dialog.dispose() AT THE END!!!! |
static java.awt.Font |
createButtonFont() |
static javax.swing.JCheckBox |
createCheckBoxWithTooltip() |
static java.awt.Font |
createFixedWidthFont() |
static java.awt.Font |
createFont(java.awt.Font font,
int style)
same Font with a different Font."
|
static java.awt.Font |
createHeaderFont() |
static javax.swing.JButton |
createImageButton(java.lang.String fileName,
java.lang.String tooltip,
java.awt.event.ActionListener listener,
java.lang.Class<?> classFromJar) |
static javax.swing.ImageIcon |
createImageIcon(java.lang.String fileName,
java.lang.Class<?> classFromJar) |
static javax.swing.ImageIcon |
createImageIcon(java.lang.String fileName,
java.lang.String toolTip,
java.lang.Class<?> classFromJar) |
static javax.swing.border.TitledBorder |
createTitledBorder(java.lang.String text) |
static java.awt.Component |
getTopParentCmp(java.awt.Component cmp)
berechnet den obersten GUI Container von cmp (not null)
|
static java.lang.Thread |
runInExtraThread_showingBusyDialog(java.lang.Runnable runnable,
java.awt.Component refCmp,
java.lang.String title,
boolean modal) |
static java.awt.Cursor |
setCursor(java.awt.Cursor newCursor,
java.awt.Component cmp)
Setzt den Cursor zum hoechsten erreichbaren Container
|
public static final java.lang.String FONTFAMILY
public static final java.lang.String FONTFAMILY_MONOSPACED
public static final int BASE_FONT_SIZE
public static java.lang.Thread runInExtraThread_showingBusyDialog(java.lang.Runnable runnable, java.awt.Component refCmp, java.lang.String title, boolean modal)
runnable,
- not null (will be executed in new Thread) runnable should
finish only after all other relevant and timeconsuming
Threads spawned within are finishedrefCmp
- may be null (for centering the dialog Box)title
- displayed in dialogmodal
- dialog is on Top and other app GUI is disabled for Userpublic static javax.swing.JDialog createAndShowLongActionDialog(javax.swing.JFrame owner, java.lang.String title, boolean modal)
owner
- may be null (zum Zentrieren des dialogs)title
- wird zur Orientierung des Nutzers angezeigtmodal
- if true then rest of the Application UI is blockedpublic static java.awt.Font createButtonFont()
public static java.awt.Font createHeaderFont()
public static java.awt.Font createFixedWidthFont()
public static java.awt.Font createFont(java.awt.Font font, int style)
public static javax.swing.JButton createImageButton(java.lang.String fileName, java.lang.String tooltip, java.awt.event.ActionListener listener, java.lang.Class<?> classFromJar)
fileName
- relativ zu src/resources zB "filter/editFilter24.gif"tooltip
- beliebiger Text als Tooltiplistener
- action beim Pressen des buttonsclassFromJar
- damit das image auch geladen werden kannpublic static javax.swing.ImageIcon createImageIcon(java.lang.String fileName, java.lang.String toolTip, java.lang.Class<?> classFromJar)
fileName
- relativ zu src/resources zB "filter/editFilter24.gif"toolTip
- beliebiger Text als TooltipclassFromJar
- damit das image auch geladen werden kannpublic static javax.swing.ImageIcon createImageIcon(java.lang.String fileName, java.lang.Class<?> classFromJar)
fileName
- relativ zu src/resources zB "filter/editFilter24.gif"classFromJar
- damit das image auch geladen werden kannpublic static javax.swing.JCheckBox createCheckBoxWithTooltip()
public static javax.swing.border.TitledBorder createTitledBorder(java.lang.String text)
public static java.awt.Cursor setCursor(java.awt.Cursor newCursor, java.awt.Component cmp)
newCursor
- new cursorpublic static java.awt.Component getTopParentCmp(java.awt.Component cmp)
13-September-2017 07:50 Deutsches Elektronen-Synchrotron DESY in der Helmholtz-Gemeinschaft