Interface WorkbenchLayout

  • All Known Implementing Classes:
    WorkbenchLayoutImpl

    public interface WorkbenchLayout
    Used by the workbench to construct the outer most DOM structure (header, footer and perspective container). Uberfire provides a default WorkbenchLayoutImpl that can be replaced through the mechanism described in LayoutSelection.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      com.google.gwt.user.client.ui.HasWidgets getPerspectiveContainer()
      Gives access to the element of the workbench that hosts perspective widgets.
      com.google.gwt.user.client.ui.IsWidget getRoot()
      Gives access to the root container element that will be attached to the RootLayoutPanel.
      void maximize​(com.google.gwt.user.client.ui.Widget w)
      Makes the given widget fill the entire space normally dedicated to the perspective container.
      void maximize​(com.google.gwt.user.client.ui.Widget w, org.uberfire.mvp.Command callback)
      Makes the given widget fill the entire space normally dedicated to the perspective container.
      void onBootstrap()
      Will be invoked by the Workbench when the discovery of header and footer elements is completed.
      void onResize()
      The Workbench listens for resize events and hands them off to the layout.
      void resizeTo​(int width, int height)
      void setMarginWidgets​(boolean isStandaloneMode, Set<String> headersToKeep)
      Will insert the implementations of Header and Footer in the Workbench
      void unmaximize​(com.google.gwt.user.client.ui.Widget w)
      Restores a previously maximized widget to its original size and position.
      void unmaximize​(com.google.gwt.user.client.ui.Widget w, org.uberfire.mvp.Command callback)
      Restores a previously maximized widget to its original size and position.
    • Method Detail

      • getRoot

        com.google.gwt.user.client.ui.IsWidget getRoot()
        Gives access to the root container element that will be attached to the RootLayoutPanel.
        Returns:
        the outer most workbench widget
      • getPerspectiveContainer

        com.google.gwt.user.client.ui.HasWidgets getPerspectiveContainer()
        Gives access to the element of the workbench that hosts perspective widgets.
        Returns:
        the perspective container element
      • onBootstrap

        void onBootstrap()
        Will be invoked by the Workbench when the discovery of header and footer elements is completed.
      • onResize

        void onResize()
        The Workbench listens for resize events and hands them off to the layout. Not needed if your layout is based on LayoutPanel's. Kept for backwards compatibility.
      • resizeTo

        void resizeTo​(int width,
                      int height)
        Parameters:
        width -
        height -
      • maximize

        void maximize​(com.google.gwt.user.client.ui.Widget w)
        Makes the given widget fill the entire space normally dedicated to the perspective container. Has no effect if the given widget is already maximized.

        Important: this feature is used by panels to maximize themselves. You should not pass a WorkbenchPanelView to this method yourself; instead, you should use the panel's own API to maximize it. You are free to use this method to maximize your own widgets that are not workbench panels.

        Parameters:
        w - the Widget to maximize.
      • maximize

        void maximize​(com.google.gwt.user.client.ui.Widget w,
                      org.uberfire.mvp.Command callback)
        Makes the given widget fill the entire space normally dedicated to the perspective container. Has no effect if the given widget is already maximized.

        Important: this feature is used by panels to maximize themselves. You should not pass a WorkbenchPanelView to this method yourself; instead, you should use the panel's own API to maximize it. You are free to use this method to maximize your own widgets that are not workbench panels.

        Parameters:
        w - the Widget to maximize.
        callback - A command to be executed after the maximization is fully completed.
      • unmaximize

        void unmaximize​(com.google.gwt.user.client.ui.Widget w)
        Restores a previously maximized widget to its original size and position. Has no effect if the given widget is not currently in a maximized state set up by maximize(Widget).

        Important: this feature is used by panels to unmaximize themselves. You should not pass a WorkbenchPanelView to this method yourself; instead, you should use the panel's own API to unmaximize it. You are free to use this method to unmaximize your own widgets that have previously been passed to maximize(Widget).

        Parameters:
        w - the Widget to restore to its original size and location.
      • unmaximize

        void unmaximize​(com.google.gwt.user.client.ui.Widget w,
                        org.uberfire.mvp.Command callback)
        Restores a previously maximized widget to its original size and position. Has no effect if the given widget is not currently in a maximized state set up by maximize(Widget).

        Important: this feature is used by panels to unmaximize themselves. You should not pass a WorkbenchPanelView to this method yourself; instead, you should use the panel's own API to unmaximize it. You are free to use this method to unmaximize your own widgets that have previously been passed to maximize(Widget).

        Parameters:
        w - the Widget to restore to its original size and location.
        callback - A command to be executed after the unmaximization is fully completed.
      • setMarginWidgets

        void setMarginWidgets​(boolean isStandaloneMode,
                              Set<String> headersToKeep)
        Will insert the implementations of Header and Footer in the Workbench