public abstract class AbstractDockingWorkbenchPanelPresenter<P extends AbstractWorkbenchPanelPresenter<P>> extends AbstractWorkbenchPanelPresenter<P> implements DockingWorkbenchPanelPresenter
CompassPosition
positions.childPanels, perspectiveManager
Constructor and Description |
---|
AbstractDockingWorkbenchPanelPresenter(WorkbenchPanelView<P> view,
PerspectiveManager perspectiveManager) |
Modifier and Type | Method and Description |
---|---|
void |
addPanel(WorkbenchPanelPresenter newChild,
org.uberfire.workbench.model.Position position)
Forwards requests to existing child panels in case there is already a child panel in the requested position.
|
DockingWorkbenchPanelView<P> |
getPanelView()
Returns the view that was given to this panel when it was first created.
|
boolean |
removePanel(WorkbenchPanelPresenter child)
Checks for existing child panels of the panel to be removed, and reparents them to this panel in the position of
the child panel.
|
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 |
setChildSize(WorkbenchPanelPresenter child,
Integer pixelWidth,
Integer pixelHeight)
Sets the width or height of the given child panel to the given dimension, leaving room for the existing space
taken up by (recursively) nested panels in the NORTH, SOUTH, EAST, and WEST child positions.
|
addPart, addPart, asPresenterType, changeTitle, getDefaultChildType, getDefinition, getPanels, getParent, getPartType, maximize, onResize, positionOf, selectPart, setDefinition, setFocus, setParent, toString, unmaximize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addPart, addPart, changeTitle, getDefaultChildType, getDefinition, getPanels, getParent, getPartType, maximize, onResize, selectPart, setDefinition, setFocus, setParent, unmaximize
public AbstractDockingWorkbenchPanelPresenter(WorkbenchPanelView<P> view, PerspectiveManager perspectiveManager)
public void addPanel(WorkbenchPanelPresenter newChild, org.uberfire.workbench.model.Position position)
addPanel
in interface WorkbenchPanelPresenter
addPanel
in class AbstractWorkbenchPanelPresenter<P extends AbstractWorkbenchPanelPresenter<P>>
newChild
- 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.public boolean removePanel(WorkbenchPanelPresenter child)
removePanel
in interface WorkbenchPanelPresenter
removePanel
in class AbstractWorkbenchPanelPresenter<P extends AbstractWorkbenchPanelPresenter<P>>
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.public boolean setChildSize(WorkbenchPanelPresenter child, Integer pixelWidth, Integer pixelHeight)
DockingWorkbenchPanelPresenter
setChildSize
in interface DockingWorkbenchPanelPresenter
child
- the child panel whose size to changepixelWidth
- the new width for the child panel, if it supports horizontal resizing. If null, the width will not be
changed.pixelHeight
- the new height for the child panel, if it supports vertical resizing. If null, the height will not be
changed.public boolean removePart(org.uberfire.workbench.model.PartDefinition part)
WorkbenchPanelPresenter
removePart
in interface WorkbenchPanelPresenter
removePart
in class AbstractWorkbenchPanelPresenter<P extends AbstractWorkbenchPanelPresenter<P>>
WorkbenchPanelPresenter.addPart(WorkbenchPartPresenter)
public DockingWorkbenchPanelView<P> getPanelView()
WorkbenchPanelPresenter
getPanelView
in interface WorkbenchPanelPresenter
getPanelView
in class AbstractWorkbenchPanelPresenter<P extends AbstractWorkbenchPanelPresenter<P>>
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.