Interface MultiPartWidget

  • All Superinterfaces:
    com.google.gwt.event.logical.shared.HasBeforeSelectionHandlers<org.uberfire.workbench.model.PartDefinition>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.event.logical.shared.HasSelectionHandlers<org.uberfire.workbench.model.PartDefinition>, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.RequiresResize
    All Known Subinterfaces:
    ListBarWidget

    public interface MultiPartWidget
    extends com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.RequiresResize, com.google.gwt.event.logical.shared.HasBeforeSelectionHandlers<org.uberfire.workbench.model.PartDefinition>, com.google.gwt.event.logical.shared.HasSelectionHandlers<org.uberfire.workbench.model.PartDefinition>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addOnFocusHandler​(org.uberfire.mvp.Command doWhenFocused)
      Registers the given Command to be called each time something happens (for example, a UI gesture or parhaps an API call) to make this widget believe its containing panel should be the focused panel.
      void addPart​(WorkbenchPartPresenter.View view)  
      void changeTitle​(org.uberfire.workbench.model.PartDefinition part, String title, com.google.gwt.user.client.ui.IsWidget titleDecoration)  
      void clear()
      Removes all contained WorkbenchParts from this multi-part panel.
      Collection<org.uberfire.workbench.model.PartDefinition> getParts()
      Returns the parts currently held by this widget.
      int getPartsSize()
      Returns the number of parts currently held by this widget.
      boolean remove​(org.uberfire.workbench.model.PartDefinition part)
      Removes the given part from this widget.
      boolean selectPart​(org.uberfire.workbench.model.PartDefinition part)
      Makes the given part visible if it is a direct child of this widget.
      void setDndManager​(WorkbenchDragAndDropManager dndManager)  
      void setFocus​(boolean hasFocus)
      Informs this widget that its containing panel view has gained or lost panel focus.
      void setPresenter​(WorkbenchPanelPresenter presenter)  
      • Methods inherited from interface com.google.gwt.event.logical.shared.HasBeforeSelectionHandlers

        addBeforeSelectionHandler
      • Methods inherited from interface com.google.gwt.event.shared.HasHandlers

        fireEvent
      • Methods inherited from interface com.google.gwt.event.logical.shared.HasSelectionHandlers

        addSelectionHandler
      • Methods inherited from interface com.google.gwt.user.client.ui.IsWidget

        asWidget
      • Methods inherited from interface com.google.gwt.user.client.ui.RequiresResize

        onResize
    • Method Detail

      • clear

        void clear()
        Removes all contained WorkbenchParts from this multi-part panel. Part Activities are not closed and part Presenters are not freed.
      • changeTitle

        void changeTitle​(org.uberfire.workbench.model.PartDefinition part,
                         String title,
                         com.google.gwt.user.client.ui.IsWidget titleDecoration)
      • selectPart

        boolean selectPart​(org.uberfire.workbench.model.PartDefinition part)
        Makes the given part visible if it is a direct child of this widget.
        Parameters:
        part - the direct child part to select. Must not be null.
        Returns:
        true if the part was found as a direct child of this widget, and it was therefore selected. False if the part was not found, in which case this method had no effect.
      • remove

        boolean remove​(org.uberfire.workbench.model.PartDefinition part)
        Removes the given part from this widget. If the part was currently selected (visible) when removed, another part will be selected to take its place.
        Parameters:
        part - the part to remove. Must not be null.
        Returns:
        True if the given part was found as a direct child of this widget, in which case it has been removed. False if the given part was not found, in which case this method had no effect.
      • setFocus

        void setFocus​(boolean hasFocus)
        Informs this widget that its containing panel view has gained or lost panel focus. Views within focused panels may respond by updating their style to look more prominent than unfocused views.
        Parameters:
        hasFocus - if true, the containing panel now has focus. If false, the panel does not have focus.
      • addOnFocusHandler

        void addOnFocusHandler​(org.uberfire.mvp.Command doWhenFocused)
        Registers the given Command to be called each time something happens (for example, a UI gesture or parhaps an API call) to make this widget believe its containing panel should be the focused panel.

        Restated for clarity: the given command is called when this view thinks its panel should get focus. The command is not called as a side effect of calls to setFocus(boolean).

        Parameters:
        doWhenFocused - the command to call when this widget believes its panel should become focused. Typically, the given command will call into the PanelManager to give focus to the containing panel.
      • getPartsSize

        int getPartsSize()
        Returns the number of parts currently held by this widget.
      • getParts

        Collection<org.uberfire.workbench.model.PartDefinition> getParts()
        Returns the parts currently held by this widget.