Class UIModelManipulator
java.lang.Object
org.eclipse.ease.modules.platform.UIModelManipulator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MUIElementfindElement(String id) Find the UI element for a given id.static MPerspectiveGet the currently active perspective.static StringgetIDForName(String name) Find ID for a given view name.static voidmove(MUIElement uiElement, MElementContainer<MUIElement> targetContainer) Move a UI element to another container.static voidreconcileContainer(MElementContainer<MUIElement> container) Remove empty containers if there are any.static MPartSashContainersplitPartStack(MElementContainer<MUIElement> stack, int position) Split a givenMPartStack.
-
Constructor Details
-
UIModelManipulator
public UIModelManipulator()
-
-
Method Details
-
getIDForName
Find ID for a given view name. If name already contains a valid id, it will be returned.- Parameters:
name- name of view- Returns:
- view ID or
null
-
findElement
Find the UI element for a given id.- Parameters:
id- id to look for- Returns:
- UI element instance or
null
-
getCurrentPerspective
Get the currently active perspective.- Returns:
- active perspective instance
-
splitPartStack
Split a givenMPartStack. Effectively we replace the part stack with a sash container and put the old part stack into the sash container.- Parameters:
stack- stack to splitposition- where to put the existing stack within the sash. One ofSWT.TOP,SWT.BOTTOM,SWT.LEFT,SWT.RIGHT- Returns:
- newly created sash container
-
move
Move a UI element to another container.- Parameters:
uiElement- element to movetargetContainer- target container to move to
-
reconcileContainer
Remove empty containers if there are any.- Parameters:
container- container to reconcile
-