public interface WorkbenchPanelPresenter
Modifier and Type | Method and Description |
---|---|
void |
addPanel(WorkbenchPanelPresenter child,
org.uberfire.workbench.model.Position position)
Adds the given panel as a subpanel of this one in the given position.
|
void |
addPart(WorkbenchPartPresenter part)
Adds the given part to this panel's content area, updating this panel's definition and the part's definition to
reflect the new part ownership.
|
void |
addPart(WorkbenchPartPresenter part,
String contextId)
Adds the given part to this panel with the given context ID, updating this panel's definition and the part's
definition to reflect the new part ownership.
|
void |
changeTitle(org.uberfire.workbench.model.PartDefinition part,
String title,
com.google.gwt.user.client.ui.IsWidget titleDecoration) |
String |
getDefaultChildType()
Returns the panel type that should be used when adding child panels of type
PanelDefinition.PARENT_CHOOSES_TYPE . |
org.uberfire.workbench.model.PanelDefinition |
getDefinition()
Returns a
@Portable description of the current state of this panel. |
Map<org.uberfire.workbench.model.Position,WorkbenchPanelPresenter> |
getPanels()
Returns the immediate child panels of this panel.
|
WorkbenchPanelView |
getPanelView()
Returns the view that was given to this panel when it was first created.
|
WorkbenchPanelPresenter |
getParent()
Returns the current parent of this panel presenter.
|
Class<? extends WorkbenchPartPresenter> |
getPartType()
Returns the type of new parts.
|
void |
maximize()
Makes this panel's view take up most of the space on the workbench.
|
void |
onResize(int width,
int height) |
boolean |
removePanel(WorkbenchPanelPresenter child)
Removes the given panel presenter and its view from this panel, freeing all resources associated with them.
|
boolean |
removePart(org.uberfire.workbench.model.PartDefinition part)
Removes the given part from this panel, updating this panel's definition and the part's definition to reflect
that the part no longer belongs to this panel.
|
boolean |
selectPart(org.uberfire.workbench.model.PartDefinition part) |
void |
setDefinition(org.uberfire.workbench.model.PanelDefinition definition)
Called by the framework when the panel instance is first created.
|
void |
setFocus(boolean hasFocus) |
void |
setParent(WorkbenchPanelPresenter parent)
Sets the current parent of this panel presenter.
|
void |
unmaximize()
Restores this panel's view to its original unmaximized size and position.
|
WorkbenchPanelPresenter getParent()
void setParent(WorkbenchPanelPresenter parent)
parent
- the new parent of this panel. If this panel is being removed, the parent should be set to null.org.uberfire.workbench.model.PanelDefinition getDefinition()
@Portable
description of the current state of this panel.void setDefinition(org.uberfire.workbench.model.PanelDefinition definition)
definition
- description of the state this panel should put itself in. This panel is also responsible for keeping
the definition up to date with the panel's current state.void addPart(WorkbenchPartPresenter part)
Panels each implement their own policy and user interface for part management. Some panels do not support parts at all; others allow only a single part; still others can hold multiple parts at a time. Either way, panels that do display parts typically display them one at a time. Those that support multiple parts include UI widgets (eg. tabs or a dropdown list) that let the user select which one to display.
After the panel's border decorations, part switcher UI, title bar, and subpanel space has been accounted for, the part's view typically occupies all remaining space within its parent panel.
part
- the part to add. Must not be null, and must not currently belong to any panel.UnsupportedOperationException
- if this panel does not support partsvoid addPart(WorkbenchPartPresenter part, String contextId)
part
- the part to add. Must not be null, and must not currently belong to any panel.UnsupportedOperationException
- if this panel does not support partsaddPart(WorkbenchPartPresenter)
boolean removePart(org.uberfire.workbench.model.PartDefinition part)
addPart(WorkbenchPartPresenter)
void addPanel(WorkbenchPanelPresenter child, org.uberfire.workbench.model.Position position)
Subpanels are typically always visible, and take up space within the bounds of their parent panel.
child
- the panel to add. The presenter, its view, and its definition must not belong to any parent. As a side
effect of this call (if the call is successful), the given presenter, its view, and its definition
will get attached to their new parents.position
- the position to add the child at. Different panel implementations support different position types.boolean removePanel(WorkbenchPanelPresenter child)
child
- The child panel to remove. Must be a direct child of this panel, and must be empty (contain no parts
or child panels). Null is not permitted.Map<org.uberfire.workbench.model.Position,WorkbenchPanelPresenter> getPanels()
void changeTitle(org.uberfire.workbench.model.PartDefinition part, String title, com.google.gwt.user.client.ui.IsWidget titleDecoration)
void setFocus(boolean hasFocus)
boolean selectPart(org.uberfire.workbench.model.PartDefinition part)
void maximize()
WorkbenchLayout
.void unmaximize()
WorkbenchPanelView getPanelView()
void onResize(int width, int height)
String getDefaultChildType()
PanelDefinition.PARENT_CHOOSES_TYPE
.Class<? extends WorkbenchPartPresenter> getPartType()
Copyright © 2012–2018 JBoss by Red Hat. All rights reserved.