org.eclipse.net4j.util.ui
Class UIUtil
java.lang.Object
org.eclipse.net4j.util.ui.UIUtil
- public final class UIUtil
- extends Object
Method Summary |
static void |
addDecorationMargin(Control control)
|
static void |
copyToClipboard(Display display,
String text)
|
static GridData |
createEmptyGridData()
|
static Composite |
createGridComposite(Composite parent,
int columns)
|
static GridData |
createGridData()
|
static GridData |
createGridData(boolean grabHorizontal,
boolean grabVertical)
|
static GridLayout |
createGridLayout(int columns)
|
static IPasswordCredentialsProvider |
createInteractiveCredentialsProvider()
|
static void |
dispose(Color color)
|
static void |
dispose(Font font)
|
static void |
dispose(Widget widget)
|
static IWorkbenchPage |
getActiveWorkbenchPage()
|
static IWorkbenchPart |
getActiveWorkbenchPart()
|
static IWorkbenchWindow |
getActiveWorkbenchWindow()
|
static Font |
getBoldFont(Control control)
|
static Display |
getDisplay()
|
static Object |
getElement(ISelection selection)
|
static
|
getElement(ISelection selection,
Class<T> type)
|
static Object |
getElementIfOne(ISelection selection)
|
static
|
getElements(ISelection selection,
Class<T> type)
|
static Font |
getItalicFont(Control control)
|
static IWorkbench |
getWorkbench()
|
static void |
preserveViewerState(Viewer viewer,
Runnable runnable)
|
static void |
refreshElement(StructuredViewer viewer,
Object element,
boolean updateLabels)
|
static void |
refreshViewer(Viewer viewer)
|
static void |
runWithProgress(IRunnableWithProgress runnable)
|
static void |
setIndentation(Control control,
int horizontalIndent,
int verticalIndent)
Adds indentation to the control. if indent value is < 0, the control indentation is left unchanged. |
static void |
setStatusBarMessage(String message,
Image image)
Shows a message in the StatusBar. |
static int |
setValidationContext(Control control,
ValidationContext context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERROR_LOG_ID
public static final String ERROR_LOG_ID
- Since:
- 3.1
- See Also:
- Constant Field Values
copyToClipboard
public static void copyToClipboard(Display display,
String text)
- Since:
- 3.1
dispose
public static void dispose(Font font)
dispose
public static void dispose(Color color)
dispose
public static void dispose(Widget widget)
getItalicFont
public static Font getItalicFont(Control control)
- Since:
- 3.3
getBoldFont
public static Font getBoldFont(Control control)
getDisplay
public static Display getDisplay()
getWorkbench
public static IWorkbench getWorkbench()
- Since:
- 2.0
getActiveWorkbenchWindow
public static IWorkbenchWindow getActiveWorkbenchWindow()
- Since:
- 2.0
getActiveWorkbenchPage
public static IWorkbenchPage getActiveWorkbenchPage()
- Since:
- 2.0
getActiveWorkbenchPart
public static IWorkbenchPart getActiveWorkbenchPart()
- Since:
- 2.0
getElementIfOne
public static Object getElementIfOne(ISelection selection)
- Since:
- 3.0
getElement
public static Object getElement(ISelection selection)
- Since:
- 2.0
getElement
public static <T> T getElement(ISelection selection,
Class<T> type)
- Since:
- 2.0
getElements
public static <T> List<T> getElements(ISelection selection,
Class<T> type)
- Since:
- 2.0
setValidationContext
public static int setValidationContext(Control control,
ValidationContext context)
- Since:
- 3.1
createInteractiveCredentialsProvider
public static IPasswordCredentialsProvider createInteractiveCredentialsProvider()
createGridComposite
public static Composite createGridComposite(Composite parent,
int columns)
createGridLayout
public static GridLayout createGridLayout(int columns)
createGridData
public static GridData createGridData()
createGridData
public static GridData createGridData(boolean grabHorizontal,
boolean grabVertical)
createEmptyGridData
public static GridData createEmptyGridData()
- Since:
- 3.0
addDecorationMargin
public static void addDecorationMargin(Control control)
setIndentation
public static void setIndentation(Control control,
int horizontalIndent,
int verticalIndent)
- Adds indentation to the control. if indent value is < 0, the control indentation is left unchanged.
- Since:
- 2.0
runWithProgress
public static void runWithProgress(IRunnableWithProgress runnable)
- Since:
- 3.3
preserveViewerState
public static void preserveViewerState(Viewer viewer,
Runnable runnable)
- Since:
- 3.3
refreshViewer
public static void refreshViewer(Viewer viewer)
- Since:
- 2.0
refreshElement
public static void refreshElement(StructuredViewer viewer,
Object element,
boolean updateLabels)
- Since:
- 3.3
setStatusBarMessage
public static void setStatusBarMessage(String message,
Image image)
- Shows a message in the StatusBar. Image can be omitted by passing a null parameter
- Since:
- 2.0
Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.