Package org.eclipse.net4j.util.ui
Class UIUtil
java.lang.Object
org.eclipse.net4j.util.ui.UIUtil
- Author:
- Eike Stepper
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
adaptElement
(ISelection selection, Class<T> type) LikegetElement(ISelection, Class)
except that it attempts to adaptIAdaptable
s to the requiredtype
, if necessary.static <T> List<T>
adaptElements
(ISelection selection, Class<T> type) LikegetElements(ISelection, Class)
except that it attempts to adaptIAdaptable
s to the requiredtype
, if necessary.static void
addDecorationMargin
(Control control) static void
addDragSupport
(StructuredViewer viewer) static void
static void
static void
copyToClipboard
(Display display, String text) static GridData
static Composite
createGridComposite
(Composite parent, int columns) static GridData
static GridData
createGridData
(boolean grabHorizontal, boolean grabVertical) static GridData
createGridData
(int horizontalSpan, int verticalSpan) static GridLayout
createGridLayout
(int columns) static IPasswordCredentialsProvider
static void
static void
static void
static Image
static void
static void
forEachChild
(Composite composite, Consumer<Control> consumer) static IWorkbenchPage
static IWorkbenchPart
static IWorkbenchWindow
static Font
getBoldFont
(Control control) static Display
static Object
getElement
(ISelection selection) static <T> T
getElement
(ISelection selection, Class<T> type) static Object
getElementIfOne
(ISelection selection) getElements
(ISelection selection) static <T> List<T>
getElements
(ISelection selection, Class<T> type) static Font
getItalicFont
(Control control) static Shell
getShell()
static IWorkbench
static Color
static <T> T
initResource
(Function<Display, T> initializer) static boolean
static void
preserveViewerState
(Viewer viewer, Runnable runnable) static Color
redColor()
static void
refreshElement
(StructuredViewer viewer, Object element, boolean updateLabels) static void
refreshViewer
(Viewer viewer) static void
runWithProgress
(IRunnableWithProgress runnable) static void
selectReveal
(Object object) static void
setIndentation
(Control control, int horizontalIndent, int verticalIndent) Adds indentation to the control.static void
setStatusBarMessage
(String message, Image image) Shows a message in the StatusBar.static int
setValidationContext
(Control control, ValidationContext context) static void
static void
static void
updateElements
(StructuredViewer viewer, Object element)
-
Field Details
-
ERROR_LOG_ID
- Since:
- 3.1
- See Also:
-
-
Method Details
-
redColor
- Since:
- 3.12
-
grayColor
- Since:
- 3.12
-
errorImage
- Since:
- 3.12
-
copyToClipboard
- Since:
- 3.1
-
dispose
-
dispose
-
dispose
-
getItalicFont
- Since:
- 3.3
-
getBoldFont
-
getDisplay
-
getShell
- Since:
- 3.5
-
getWorkbench
- Since:
- 2.0
-
getActiveWorkbenchWindow
- Since:
- 2.0
-
getActiveWorkbenchPage
- Since:
- 2.0
-
getActiveWorkbenchPart
- Since:
- 2.0
-
getElementIfOne
- Since:
- 3.0
-
getElement
- Since:
- 2.0
-
getElement
- Since:
- 2.0
-
getElements
- Since:
- 3.5
-
getElements
- Since:
- 2.0
-
adaptElement
LikegetElement(ISelection, Class)
except that it attempts to adaptIAdaptable
s to the requiredtype
, if necessary.- Since:
- 3.4
-
adaptElements
LikegetElements(ISelection, Class)
except that it attempts to adaptIAdaptable
s to the requiredtype
, if necessary.- Since:
- 3.5
-
setValidationContext
- Since:
- 3.1
-
createInteractiveCredentialsProvider
-
createGridComposite
-
createGridLayout
-
createGridData
-
createGridData
-
createGridData
- Since:
- 3.4
-
createEmptyGridData
- Since:
- 3.0
-
addDecorationMargin
-
setIndentation
Adds indentation to the control. if indent value is < 0, the control indentation is left unchanged.- Since:
- 2.0
-
initResource
- Since:
- 3.12
-
syncExec
- Since:
- 3.5
-
syncExec
- Since:
- 3.5
-
asyncExec
- Since:
- 3.9
-
asyncExec
- Since:
- 3.9
-
exec
- Since:
- 3.9
-
runWithProgress
- Since:
- 3.3
-
preserveViewerState
- Since:
- 3.3
-
refreshViewer
- Since:
- 2.0
-
refreshElement
- Since:
- 3.3
-
updateElements
- Since:
- 3.5
-
setStatusBarMessage
Shows a message in the StatusBar. Image can be omitted by passing a null parameter- Since:
- 2.0
-
addDragSupport
- Since:
- 3.5
-
isParent
- Since:
- 3.9
-
forEachChild
- Since:
- 3.9
-
selectReveal
- Since:
- 3.10
-