Class TemplatedWorkbenchPanelView

    • Constructor Detail

      • TemplatedWorkbenchPanelView

        public TemplatedWorkbenchPanelView()
    • Method Detail

      • asWidget

        public com.google.gwt.user.client.ui.Widget asWidget()
        Specified by:
        asWidget in interface com.google.gwt.user.client.ui.IsWidget
      • onResize

        public void onResize()
        Specified by:
        onResize in interface com.google.gwt.user.client.ui.RequiresResize
      • addPanel

        public void addPanel​(org.uberfire.workbench.model.PanelDefinition panel,
                             WorkbenchPanelView<?> view,
                             org.uberfire.workbench.model.Position p)
        Description copied from interface: WorkbenchPanelView
        Nests the given WorkbenchPanelView inside this one at the given position, which must be unoccupied. This is an optional feature of WorkbenchPanelView: not all implementations support nested child panels. Additionally, different panels support different Position types. Implementations should document whether or not they support child panels, and if so, what types of Positions they understand.
        Specified by:
        addPanel in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>
        Parameters:
        panel - specifies the size that should be imposed on the nested view. Must not be null. FIXME: is this sensible/correct?
        view - the panel to nest inside this one. Must not be null.
        p - specifies which edge of this panel will be shared with the nested panel. Must not be null.
      • setFocus

        public void setFocus​(boolean hasFocus)
        Description copied from interface: WorkbenchPanelView
        Informs this view that it has gained or lost keyboard focus. Focused views may respond by updating their style to look more prominent than unfocused views.
        Specified by:
        setFocus in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>
        Parameters:
        hasFocus - if true, this panel now has focus. If false, this panel does not have focus.
      • changeTitle

        public void changeTitle​(org.uberfire.workbench.model.PartDefinition part,
                                String title,
                                com.google.gwt.user.client.ui.IsWidget titleDecoration)
        Description copied from interface: WorkbenchPanelView
        Assigns the given title to the given part, if the part belongs to this panel.
        Specified by:
        changeTitle in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>
        Parameters:
        part - the part whose title to change. Must not be null.
        title - the new title. Must not be null.
        titleDecoration - An optional widget to display beside the title. Note that some implementations do not support title decorations, and they will ignore this. Null is permitted, and means no decoration.
      • selectPart

        public boolean selectPart​(org.uberfire.workbench.model.PartDefinition part)
        Description copied from interface: WorkbenchPanelView
        Makes the given part visible and focused, if it belongs to this view.
        Specified by:
        selectPart in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>
        Parameters:
        part - the part to reveal and give focus to.
        Returns:
        true if the part was found, made visible, and given focus. False if not.
      • removePart

        public boolean removePart​(org.uberfire.workbench.model.PartDefinition part)
        Description copied from interface: WorkbenchPanelView
        Removes the given part from this view, if it belonged to this view.
        Specified by:
        removePart in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>
        Parameters:
        part - the part to remove.
        Returns:
        true if the part was found and removed. False if not.
      • getPartDropRegion

        public com.google.gwt.user.client.ui.Widget getPartDropRegion()
        Description copied from interface: WorkbenchPanelView
        Returns the widget that defines the boundaries of this panel view for purposes of drag-and-drop.
        Specified by:
        getPartDropRegion in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>
        Returns:
        the widget whose boundaries define the region where workbench parts can be dropped into this panel. For simple panel types that do not support child panels, this will typically be the same widget returned by IsWidget.asWidget(). For fancier panels, this will typically be some child panel within the view's internal structure.

        If the return value is null, parts will not be droppable on this view.

      • setElementId

        public void setElementId​(String elementId)
        Will set, but not clear, the ID of the activity's root element. Clearing is disabled because the templating system may be relying on the element's ID to find it. Of course, setting a different ID will also interfere with templating, but the expectation is that this feature would only be used with templated panels for debugging purposes.
        Specified by:
        setElementId in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>
        Parameters:
        elementId - the element ID to set. If null, the ID value will be cleared.