Package org.eclipse.e4.ui.workbench
Interface IPresentationEngine
-
public interface IPresentationEngineThe presentation engine is used to translate the generic workbench model into widgets. Implementations of this service are responsible for creating or destroying widgets corresponding to model elements, as well as for running any event loop required for handling user events on those widgets.- Since:
- 1.0
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACTIVEThis is the tag name that indicates that the model element is active.static java.lang.StringADORNMENT_PINThis is a Tag that when applied to an MUILabel element will cause whatever Image is to be shown to be adorned with the 'pinned' affordance.static java.lang.StringANIMATIONS_ENABLEDDeprecated.not supported in the Eclipse platform anymorestatic java.lang.StringCUSTOM_RENDERER_KEYThis is a persistedState 'key' whose value is expected to be the URI of a subclass of ABstractPartRenderer that is to be used to render the elementstatic java.lang.StringDISABLED_ICON_IMAGE_KEYThis key should be used to add an optional String to an element that is a URI to the elements disabled icon.static java.lang.StringDRAGGABLEThis is the tag name that enables the DND support for the element.static java.lang.StringHIDDEN_EXPLICITLYThis tag can be used by the renderer implementation to decide that the user interface element has been hidden.static java.lang.StringMAXIMIZEDWhen added to an element's 'tags' this should cause the presentation to minimize all other presentation elements.static java.lang.StringMIN_MAXIMIZEABLE_CHILDREN_AREA_TAGWhen applied to an MArea causes it to behave like aMPartSashContainerallowing the different parts to be minimized/maximized separately.static java.lang.StringMINIMIZEDWhen added to an element's 'tags' this should cause the presentation to move that element to the trim.static java.lang.StringMINIMIZED_BY_ZOOMThis tag should be applied to any element that had its MINIMIZED tag set due to a different element going maximized.static java.lang.StringNO_AUTO_COLLAPSEDon't remove the element from the display even if it has no displayable childrenstatic java.lang.StringNO_CLOSEWhen applied as a tag to an MPlaceholder inhibits the display of the close affordance.static java.lang.StringNO_DETACHWhen applied as a tag to an MUIElement inhibits detaching the element (ie.static java.lang.StringNO_MOVEWhen applied as a tag to an MUIElement inhibits moving the element (ie. through DnD...static java.lang.StringNO_RESTOREWhen applied as a tag to an MPartDescriptor marks the part as not restorable.static java.lang.StringNO_TITLEWhen applied as a tag to an MUILabel inhibits the display of the label textstatic java.lang.StringORIENTATION_HORIZONTALThis tag can be applied to an element as a hint to the renderers that the element would prefer to be horizontal.static java.lang.StringORIENTATION_VERTICALThis tag can be applied to an element as a hint to the renderers that the element would prefer to be vertical.static java.lang.StringOVERRIDE_ICON_IMAGE_KEYThis key should be used to add an optional org.eclipse.swt.graphics.Image to an elements TRANSIENTDATA.static java.lang.StringOVERRIDE_TITLE_TOOL_TIP_KEYThis key should be used to add an optional String to an elements TRANSIENTDATA.static java.lang.StringRENDERING_PARENT_KEYThis key can be used , if the model element does not have a parent and a parent needs to be specified for the renderer to create the widget.static java.lang.StringSERVICE_NAMEThe ID to access the service in theIEclipseContextstatic java.lang.StringSPLIT_HORIZONTALThis tag can be applied to an element (usually an MPart) to indicate that the element should be split with the result being side by side.static java.lang.StringSPLIT_VERTICALThis tag can be applied to an element (usually an MPart) to indicate that the element should be split with the result being one above the other.static java.lang.StringSTANDALONEDeclare the stack as containing a singe 'standalone' view.static java.lang.StringSTYLE_OVERRIDE_KEYThis key is used to store information in the 'persistentData' map which will be used to override the initial style of an element at rendering time.static java.lang.StringWINDOW_MAXIMIZED_TAGWhen applied to an MWindow causes the renderer to maximize the resulting control.static java.lang.StringWINDOW_MINIMIZED_TAGWhen applied to an MWindow causes the renderer to minimize the resulting control.static java.lang.StringWINDOW_TOP_LEVELWhen applied to an MWindow causes the renderer to render the resulting control as a top level window
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectcreateGui(MUIElement element)Creates and returns the UI element corresponding to the given model element.java.lang.ObjectcreateGui(MUIElement element, java.lang.Object parentWidget, IEclipseContext parentContext)Creates and returns the UI element for the given model element.voidfocusGui(MUIElement element)Attempts to set the UI focus onto the given element.voidremoveGui(MUIElement element)Remove the UI element created for this model element.java.lang.Objectrun(MApplicationElement uiRoot, IEclipseContext appContext)Run the UI.voidstop()Shuts down the presentation engine
-
-
-
Field Detail
-
SERVICE_NAME
static final java.lang.String SERVICE_NAME
The ID to access the service in theIEclipseContext
-
NO_TITLE
static final java.lang.String NO_TITLE
When applied as a tag to an MUILabel inhibits the display of the label text- See Also:
- Constant Field Values
-
NO_CLOSE
static final java.lang.String NO_CLOSE
When applied as a tag to an MPlaceholder inhibits the display of the close affordance. This allows a part to be closeable in one perspective but not in a different one. NOTE: If you are not using perspectives then use the MPart's 'isCloseable' attribute to control the affordance.- See Also:
- Constant Field Values
-
STANDALONE
static final java.lang.String STANDALONE
Declare the stack as containing a singe 'standalone' view. These stacks will not allow either dragging the view out of the stack nor dragging other views in.- Since:
- 1.1
- See Also:
- Constant Field Values
-
NO_AUTO_COLLAPSE
static final java.lang.String NO_AUTO_COLLAPSE
Don't remove the element from the display even if it has no displayable children- See Also:
- Constant Field Values
-
NO_MOVE
static final java.lang.String NO_MOVE
When applied as a tag to an MUIElement inhibits moving the element (ie. through DnD...- See Also:
- Constant Field Values
-
NO_DETACH
static final java.lang.String NO_DETACH
When applied as a tag to an MUIElement inhibits detaching the element (ie. through DnD...- Since:
- 1.6
- See Also:
- Constant Field Values
-
HIDDEN_EXPLICITLY
static final java.lang.String HIDDEN_EXPLICITLY
This tag can be used by the renderer implementation to decide that the user interface element has been hidden.- Since:
- 1.1
- See Also:
- Constant Field Values
-
STYLE_OVERRIDE_KEY
static final java.lang.String STYLE_OVERRIDE_KEY
This key is used to store information in the 'persistentData' map which will be used to override the initial style of an element at rendering time. For example the SWT renderer will expect to see an integer (as a string) which defines the initial SWT style bits.- Since:
- 1.1
- See Also:
- Constant Field Values
-
WINDOW_MINIMIZED_TAG
static final java.lang.String WINDOW_MINIMIZED_TAG
When applied to an MWindow causes the renderer to minimize the resulting control.- Since:
- 1.1
- See Also:
- Constant Field Values
-
WINDOW_MAXIMIZED_TAG
static final java.lang.String WINDOW_MAXIMIZED_TAG
When applied to an MWindow causes the renderer to maximize the resulting control.- Since:
- 1.1
- See Also:
- Constant Field Values
-
MIN_MAXIMIZEABLE_CHILDREN_AREA_TAG
static final java.lang.String MIN_MAXIMIZEABLE_CHILDREN_AREA_TAG
When applied to an MArea causes it to behave like aMPartSashContainerallowing the different parts to be minimized/maximized separately.- Since:
- 1.5
- See Also:
- Constant Field Values
-
WINDOW_TOP_LEVEL
static final java.lang.String WINDOW_TOP_LEVEL
When applied to an MWindow causes the renderer to render the resulting control as a top level window- Since:
- 1.3
- See Also:
- Constant Field Values
-
MINIMIZED
static final java.lang.String MINIMIZED
When added to an element's 'tags' this should cause the presentation to move that element to the trim. In the default implementation you can only apply this tag to an MPartStack or the MPlaceholder of the MArea.- See Also:
- Constant Field Values
-
MAXIMIZED
static final java.lang.String MAXIMIZED
When added to an element's 'tags' this should cause the presentation to minimize all other presentation elements. In the default implementation you can only apply this tag to an MPartStack or the MPlaceholder of the MArea.- See Also:
- Constant Field Values
-
MINIMIZED_BY_ZOOM
static final java.lang.String MINIMIZED_BY_ZOOM
This tag should be applied to any element that had its MINIMIZED tag set due to a different element going maximized. This allows the restore operation to only restore elements that the user did not explicitly minimize.- See Also:
- Constant Field Values
-
ORIENTATION_HORIZONTAL
static final java.lang.String ORIENTATION_HORIZONTAL
This tag can be applied to an element as a hint to the renderers that the element would prefer to be horizontal. For an MPart this could be used both as a hint to how to show the view when it's in the trim but could also be used when picking a stack to add a newly opening part to. It could also be used for example to control where the tabs appear on an MPartStack.- See Also:
- Constant Field Values
-
ORIENTATION_VERTICAL
static final java.lang.String ORIENTATION_VERTICAL
This tag can be applied to an element as a hint to the renderers that the element would prefer to be vertical. For an MPart this could be used both as a hint to how to show the view when it's in the trim but could also be used when picking a stack to add a newly opening part to. It could also be used for example to control where the tabs appear on an MPartStack.- See Also:
- Constant Field Values
-
SPLIT_HORIZONTAL
static final java.lang.String SPLIT_HORIZONTAL
This tag can be applied to an element (usually an MPart) to indicate that the element should be split with the result being side by side.- Since:
- 1.1
- See Also:
- Constant Field Values
-
SPLIT_VERTICAL
static final java.lang.String SPLIT_VERTICAL
This tag can be applied to an element (usually an MPart) to indicate that the element should be split with the result being one above the other.- Since:
- 1.1
- See Also:
- Constant Field Values
-
DISABLED_ICON_IMAGE_KEY
static final java.lang.String DISABLED_ICON_IMAGE_KEY
This key should be used to add an optional String to an element that is a URI to the elements disabled icon. This is used, for example, by Toolbar Items which, in Eclipse SDK, provide a unique icon for disabled tool items that look better than the OS default graying on the default icon. There is a strong argument to be made that this disabledIconURI actually be part of the model- See Also:
- Constant Field Values
-
OVERRIDE_ICON_IMAGE_KEY
static final java.lang.String OVERRIDE_ICON_IMAGE_KEY
This key should be used to add an optional org.eclipse.swt.graphics.Image to an elements TRANSIENTDATA. If present, the image will be used to override that elements iconURI. An example is drawing the error icon on a minimized problems view stack. NOTE: This image must be checked to ensure that it hasn't been disposed on retrieval.- See Also:
- Constant Field Values
-
OVERRIDE_TITLE_TOOL_TIP_KEY
static final java.lang.String OVERRIDE_TITLE_TOOL_TIP_KEY
This key should be used to add an optional String to an elements TRANSIENTDATA. If present, the string will be used to override the elements TitleToolTip. An example is setting the ToolTip of a minimized problems view stack to the number of errors and warnings in the view.- See Also:
- Constant Field Values
-
ADORNMENT_PIN
static final java.lang.String ADORNMENT_PIN
This is a Tag that when applied to an MUILabel element will cause whatever Image is to be shown to be adorned with the 'pinned' affordance.- Since:
- 1.1
- See Also:
- Constant Field Values
-
ANIMATIONS_ENABLED
static final java.lang.String ANIMATIONS_ENABLED
Deprecated.not supported in the Eclipse platform anymoreThis is a Boolean preference used to control animations in the application- See Also:
- Constant Field Values
-
CUSTOM_RENDERER_KEY
static final java.lang.String CUSTOM_RENDERER_KEY
This is a persistedState 'key' whose value is expected to be the URI of a subclass of ABstractPartRenderer that is to be used to render the element- See Also:
- Constant Field Values
-
RENDERING_PARENT_KEY
static final java.lang.String RENDERING_PARENT_KEY
This key can be used , if the model element does not have a parent and a parent needs to be specified for the renderer to create the widget.- Since:
- 1.4
- See Also:
- Constant Field Values
-
DRAGGABLE
static final java.lang.String DRAGGABLE
This is the tag name that enables the DND support for the element. The element's tags list has to be updated with the tag in order to enable the DND processing.- Since:
- 1.1
- See Also:
- Constant Field Values
-
ACTIVE
static final java.lang.String ACTIVE
This is the tag name that indicates that the model element is active.- Since:
- 1.3
- See Also:
- Constant Field Values
-
NO_RESTORE
static final java.lang.String NO_RESTORE
When applied as a tag to an MPartDescriptor marks the part as not restorable.- Since:
- 1.6
- See Also:
- Constant Field Values
-
-
Method Detail
-
createGui
java.lang.Object createGui(MUIElement element, java.lang.Object parentWidget, IEclipseContext parentContext)
Creates and returns the UI element for the given model element.- Parameters:
element- the model elementparentWidget- the parentparentContext- the context within which this element is being rendered- Returns:
- the created UI element
-
createGui
java.lang.Object createGui(MUIElement element)
Creates and returns the UI element corresponding to the given model element. The resulting UI element sits at the top of a widget hierarchy- Parameters:
element- the model element- Returns:
- the create UI element
-
removeGui
void removeGui(MUIElement element)
Remove the UI element created for this model element.- Parameters:
element- the model element whose UI element should removed
-
focusGui
void focusGui(MUIElement element)
Attempts to set the UI focus onto the given element. By default we delegate this to the elements implementation's @Focus method (if any). If no such method exists we delegate the the renderer's 'forceFocus' method.- Parameters:
element- the element to set UI focus on
-
run
java.lang.Object run(MApplicationElement uiRoot, IEclipseContext appContext)
Run the UI. This method is responsible for creating the initial UI and (if necessary) spinning the event loop for the life of the application.- Parameters:
uiRoot- the root gui elementappContext- application context- Returns:
- The application's return value
-
stop
void stop()
Shuts down the presentation engine
-
-