Class AbstractDockingWorkbenchPanelPresenter<P extends AbstractWorkbenchPanelPresenter<P>>

    • Method Detail

      • addPanel

        public 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. Otherwise behaves exactly like the superclass.
        Specified by:
        addPanel in interface WorkbenchPanelPresenter
        Overrides:
        addPanel in class AbstractWorkbenchPanelPresenter<P extends AbstractWorkbenchPanelPresenter<P>>
        Parameters:
        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.
      • removePanel

        public 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. Once the child panels are safely out of the way, the actual panel removal is done by a call to super.removePanel().
        Specified by:
        removePanel in interface WorkbenchPanelPresenter
        Overrides:
        removePanel in class AbstractWorkbenchPanelPresenter<P extends AbstractWorkbenchPanelPresenter<P>>
        Parameters:
        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.
        Returns:
        true if the child was found and removed from this panel; false if the child panel could not be found.
      • setChildSize

        public boolean setChildSize​(WorkbenchPanelPresenter child,
                                    Integer pixelWidth,
                                    Integer pixelHeight)
        Description copied from interface: DockingWorkbenchPanelPresenter
        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. Width is applied to EAST or WEST children; height is applied to NORTH and SOUTH children. If the requested space isn't available (for instance because it is larger than the browser window, or it would make the central panel of this view smaller than its minimum size) then the largest possible amount will be given to the requested child. Similarly, if the requested size is less than the child's minimum width or height (as appropriate) then the child will be set to its minimum.
        Specified by:
        setChildSize in interface DockingWorkbenchPanelPresenter
        Parameters:
        child - the child panel whose size to change
        pixelWidth - 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.
        Returns:
        true if the given child was in fact part of this panel; false if the child was not found. The return value is not affected by whether or not the requested size was null.