public class UIModelManipulator
extends java.lang.Object
Constructor and Description |
---|
UIModelManipulator() |
Modifier and Type | Method and Description |
---|---|
static MUIElement |
findElement(java.lang.String id)
Find the UI element for a given id.
|
static MPerspective |
getCurrentPerspective()
Get the currently active perspective.
|
static java.lang.String |
getIDForName(java.lang.String name)
Find ID for a given view name.
|
static void |
move(MUIElement uiElement,
MElementContainer<MUIElement> targetContainer)
Move a UI element to another container.
|
static void |
reconcileContainer(MElementContainer<MUIElement> container)
Remove empty containers if there are any.
|
static MPartSashContainer |
splitPartStack(MElementContainer<MUIElement> stack,
int position)
Split a given
MPartStack . |
public static java.lang.String getIDForName(java.lang.String name)
name
- name of viewnull
public static MUIElement findElement(java.lang.String id)
id
- id to look fornull
public static MPerspective getCurrentPerspective()
public static MPartSashContainer splitPartStack(MElementContainer<MUIElement> stack, int position)
MPartStack
. Effectively we replace the part stack with a sash container and put the old part stack into the sash container.stack
- stack to splitposition
- where to put the existing stack within the sash. One of SWT.TOP
, SWT.BOTTOM
, SWT.LEFT
, SWT.RIGHT
public static void move(MUIElement uiElement, MElementContainer<MUIElement> targetContainer)
uiElement
- element to movetargetContainer
- target container to move topublic static void reconcileContainer(MElementContainer<MUIElement> container)
container
- container to reconcile