public final class UIUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ERROR_LOG_ID |
Modifier and Type | Method and Description |
---|---|
static <T> T |
adaptElement(ISelection selection,
Class<T> type)
Like
getElement(ISelection, Class) except that it attempts to adapt
IAdaptable s to the required type , if necessary. |
static <T> List<T> |
adaptElements(ISelection selection,
Class<T> type)
Like
getElements(ISelection, Class) except that it attempts to adapt
IAdaptable s to the required type , if necessary. |
static void |
addDecorationMargin(Control control) |
static void |
addDragSupport(StructuredViewer viewer) |
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 GridData |
createGridData(int horizontalSpan,
int verticalSpan) |
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 <T> T |
getElement(ISelection selection,
Class<T> type) |
static Object |
getElementIfOne(ISelection selection) |
static List<Object> |
getElements(ISelection selection) |
static <T> List<T> |
getElements(ISelection selection,
Class<T> type) |
static Font |
getItalicFont(Control control) |
static Shell |
getShell() |
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) |
static void |
syncExec(Display display,
Runnable runnable) |
static void |
syncExec(Runnable runnable) |
static void |
updateElements(StructuredViewer viewer,
Object element) |
public static final String ERROR_LOG_ID
public static void dispose(Font font)
public static void dispose(Color color)
public static void dispose(Widget widget)
public static Display getDisplay()
public static Shell getShell()
public static IWorkbench getWorkbench()
public static IWorkbenchWindow getActiveWorkbenchWindow()
public static IWorkbenchPage getActiveWorkbenchPage()
public static IWorkbenchPart getActiveWorkbenchPart()
public static Object getElementIfOne(ISelection selection)
public static Object getElement(ISelection selection)
public static <T> T getElement(ISelection selection, Class<T> type)
public static List<Object> getElements(ISelection selection)
public static <T> List<T> getElements(ISelection selection, Class<T> type)
public static <T> T adaptElement(ISelection selection, Class<T> type)
getElement(ISelection, Class)
except that it attempts to adapt
IAdaptable
s to the required type
, if necessary.public static <T> List<T> adaptElements(ISelection selection, Class<T> type)
getElements(ISelection, Class)
except that it attempts to adapt
IAdaptable
s to the required type
, if necessary.public static int setValidationContext(Control control, ValidationContext context)
public static IPasswordCredentialsProvider createInteractiveCredentialsProvider()
public static GridLayout createGridLayout(int columns)
public static GridData createGridData()
public static GridData createGridData(boolean grabHorizontal, boolean grabVertical)
public static GridData createGridData(int horizontalSpan, int verticalSpan)
public static GridData createEmptyGridData()
public static void addDecorationMargin(Control control)
public static void setIndentation(Control control, int horizontalIndent, int verticalIndent)
public static void syncExec(Runnable runnable)
public static void runWithProgress(IRunnableWithProgress runnable)
public static void preserveViewerState(Viewer viewer, Runnable runnable)
public static void refreshViewer(Viewer viewer)
public static void refreshElement(StructuredViewer viewer, Object element, boolean updateLabels)
public static void updateElements(StructuredViewer viewer, Object element)
public static void setStatusBarMessage(String message, Image image)
public static void addDragSupport(StructuredViewer viewer)
Copyright (c) 2011-2015 Eike Stepper (Berlin, Germany) and others.