|
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.elexis.util.SWTHelper
public class SWTHelper
statische Hilfsfunktionen für SWT-Objekte
Nested Class Summary | |
---|---|
static interface |
SWTHelper.IControlProvider
|
static class |
SWTHelper.SimpleDialog
|
Constructor Summary | |
---|---|
SWTHelper()
|
Method Summary | |
---|---|
static void |
addSeparator(org.eclipse.swt.widgets.Composite parent)
Convenience method to add a separator bar to the composite. |
static void |
alert(java.lang.String title,
java.lang.String message)
Eine Alertbox anzeigen (synchron) |
static boolean |
askYesNo(java.lang.String title,
java.lang.String message)
Eine mit Ja oder Nein zu beantwortende Frage im UI-Thread zeigen |
static java.lang.Boolean |
askYesNoCancel(java.lang.String title,
java.lang.String message)
Eine mit Ja, Nein oder Abbrechen zu beantwortende Frage im UI-Thread zeigen |
static boolean |
blameEmptyString(java.lang.String test,
java.lang.String name)
Check whether the String is empty and give an error message if so |
static void |
center(org.eclipse.swt.widgets.Shell child)
Ein Objekt auf dem Bildschirm zentrieren. |
static void |
center(org.eclipse.swt.widgets.Shell parent,
org.eclipse.swt.widgets.Composite child)
Ein Objekt innerhalb des parents zentrieren |
static void |
center(org.eclipse.swt.widgets.Shell parent,
org.eclipse.swt.widgets.Shell child)
Ein Objekt innerhalb des parents zentrieren |
static java.awt.Font |
createAWTFontFromSWTFont(org.eclipse.swt.graphics.Font swtFont)
|
static org.eclipse.swt.widgets.Label |
createHyperlink(org.eclipse.swt.widgets.Composite parent,
java.lang.String text,
org.eclipse.ui.forms.events.IHyperlinkListener lis)
Return a Label that acts as a hyperlink |
static LabeledInputField |
createLabeledField(org.eclipse.swt.widgets.Composite parent,
java.lang.String label,
LabeledInputField.Typ typ)
|
static org.eclipse.ui.forms.widgets.TableWrapLayout |
createTableWrapLayout(int numColumns,
boolean makeColumnsEqualWidth)
Constructor wrapper for TableWrapLayout, so that parameters are identical to GridLayout(numColumns, makeColumnsEqualWidth) |
static org.eclipse.swt.widgets.Text |
createText(org.eclipse.swt.widgets.Composite parent,
int lines,
int flags)
Create a multiline text widget with a specified height in lines (calculated with the Text's default font) |
static org.eclipse.swt.widgets.Text |
createText(org.eclipse.ui.forms.widgets.FormToolkit tk,
org.eclipse.swt.widgets.Composite parent,
int lines,
int flags)
|
static org.eclipse.swt.layout.GridData |
fillGrid(org.eclipse.swt.widgets.Composite parent,
int cols)
|
static org.eclipse.swt.graphics.Color |
getContrast(org.eclipse.swt.graphics.Color col)
Return a color that contrasts optimally to the given color |
static org.eclipse.swt.layout.GridData |
getFillGridData()
Shortcut for getFillGridData(1,true,1,true); |
static org.eclipse.swt.layout.GridData |
getFillGridData(int hSpan,
boolean hFill,
int vSpan,
boolean vFill)
Ein GridData-Objekt erzeugen, das den horizontalen und/oder vertikalen Freiraum ausfüllt. |
static org.eclipse.ui.forms.widgets.TableWrapData |
getFillTableWrapData(int hSpan,
boolean hFill,
int vSpan,
boolean vFill)
Ein TableWrapDAta-Objekt erzeugen, das den horizontalen und/oder vertikalen Freiraum ausfüllt. |
static org.eclipse.swt.graphics.Point |
getStringBounds(org.eclipse.swt.widgets.Composite c,
java.lang.String s)
|
static void |
reloadViewPart(java.lang.String viewID)
This method "reloads" a view, by closing and opening it. |
static org.eclipse.swt.layout.GridData |
setGridDataHeight(org.eclipse.swt.widgets.Control control,
int lines,
boolean fillHorizontal)
Set a GridData to the given Control that sets the specified height in lines calculated with the control's current font. |
static void |
setSelectOnFocus(org.eclipse.swt.widgets.Text text)
Adds a FocusListener to text so that the text is selected as soon as the control
gets the focus. |
static void |
showError(java.lang.String title,
java.lang.String message)
Eine Standard-Fehlermeldung asynchron im UI-Thread zeigen |
static void |
showError(java.lang.String logHeader,
java.lang.String title,
java.lang.String message)
Eine Standard-Fehlermeldung asynchron zeigen und loggen |
static void |
showInfo(java.lang.String title,
java.lang.String message)
Eine Standard-Infomeldung asynchron zeigen |
static int |
size(org.eclipse.swt.graphics.Rectangle r)
|
static void |
writeCentered(org.eclipse.swt.graphics.GC gc,
java.lang.String text,
org.eclipse.swt.graphics.Rectangle bounds)
Einen Text zentriert in ein Rechteck schreiben |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SWTHelper()
Method Detail |
---|
public static void center(org.eclipse.swt.widgets.Shell parent, org.eclipse.swt.widgets.Composite child)
public static void center(org.eclipse.swt.widgets.Shell parent, org.eclipse.swt.widgets.Shell child)
public static void center(org.eclipse.swt.widgets.Shell child)
public static void writeCentered(org.eclipse.swt.graphics.GC gc, java.lang.String text, org.eclipse.swt.graphics.Rectangle bounds)
public static void alert(java.lang.String title, java.lang.String message)
public static void showError(java.lang.String title, java.lang.String message)
title
- Titelmessage
- Nachrichtpublic static void showError(java.lang.String logHeader, java.lang.String title, java.lang.String message)
title
- Titelmessage
- Nachrichtpublic static void showInfo(java.lang.String title, java.lang.String message)
title
- Titelmessage
- Nachrichtpublic static boolean askYesNo(java.lang.String title, java.lang.String message)
title
- Titelmessage
- Nachricht
public static java.lang.Boolean askYesNoCancel(java.lang.String title, java.lang.String message)
title
- Titelmessage
- Nachricht
public static org.eclipse.swt.layout.GridData getFillGridData()
public static org.eclipse.swt.layout.GridData getFillGridData(int hSpan, boolean hFill, int vSpan, boolean vFill)
horizontal
- true, wenn horizontal gefüllt werden sollvertical
- true, wenn vertikal gefüllt werden soll.
public static org.eclipse.swt.layout.GridData fillGrid(org.eclipse.swt.widgets.Composite parent, int cols)
public static org.eclipse.swt.layout.GridData setGridDataHeight(org.eclipse.swt.widgets.Control control, int lines, boolean fillHorizontal)
control
- the controllines
- reuqested height of the control in linesfillHorizontal
- true if the control should require all horizontal space
public static org.eclipse.ui.forms.widgets.TableWrapLayout createTableWrapLayout(int numColumns, boolean makeColumnsEqualWidth)
public static org.eclipse.ui.forms.widgets.TableWrapData getFillTableWrapData(int hSpan, boolean hFill, int vSpan, boolean vFill)
horizontal
- true, wenn horizontal gefüllt werden sollvertical
- true, wenn vertikal gefüllt werden soll.
public static org.eclipse.swt.graphics.Color getContrast(org.eclipse.swt.graphics.Color col)
col
- an SWT Color
public static org.eclipse.swt.widgets.Label createHyperlink(org.eclipse.swt.widgets.Composite parent, java.lang.String text, org.eclipse.ui.forms.events.IHyperlinkListener lis)
parent
- parent controltext
- text to displaylis
- hyperlink listener that is called on Mouse click
public static org.eclipse.swt.widgets.Text createText(org.eclipse.swt.widgets.Composite parent, int lines, int flags)
parent
- parent compositelines
- requested height of the text fieldflags
- creation flags (SWT.MULTI and SWT.WRAP are added automatocally)
public static org.eclipse.swt.widgets.Text createText(org.eclipse.ui.forms.widgets.FormToolkit tk, org.eclipse.swt.widgets.Composite parent, int lines, int flags)
public static LabeledInputField createLabeledField(org.eclipse.swt.widgets.Composite parent, java.lang.String label, LabeledInputField.Typ typ)
public static boolean blameEmptyString(java.lang.String test, java.lang.String name)
test
- the String to testname
- the name for the String
public static void setSelectOnFocus(org.eclipse.swt.widgets.Text text)
text
so that the text is selected as soon as the control
gets the focus. The selection is cleared when the focus is lost.
text
- the Text control to add a focus listener topublic static java.awt.Font createAWTFontFromSWTFont(org.eclipse.swt.graphics.Font swtFont)
public static int size(org.eclipse.swt.graphics.Rectangle r)
public static org.eclipse.swt.graphics.Point getStringBounds(org.eclipse.swt.widgets.Composite c, java.lang.String s)
public static void addSeparator(org.eclipse.swt.widgets.Composite parent)
The parent composite must have a GridLayout
. The separator bar will span all
columns of the parent grid layout.
Code from: http://www.softwarerevolution.com/blueprints/ The Software Revolution Inc. by
Thomas Holland under GPLv3
parent
- Composite
public static void reloadViewPart(java.lang.String viewID)
viewID
-
|
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |