Package org.uberfire.client.workbench
Class WorkbenchLayoutImpl
- java.lang.Object
-
- org.uberfire.client.workbench.WorkbenchLayoutImpl
-
- All Implemented Interfaces:
WorkbenchLayout
@ApplicationScoped public class WorkbenchLayoutImpl extends Object implements WorkbenchLayout
The default layout implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classWorkbenchLayoutImpl.AbstractResizeAnimationprotected static classWorkbenchLayoutImpl.CollapseAnimationprotected static classWorkbenchLayoutImpl.ExpandAnimationprotected static classWorkbenchLayoutImpl.OriginalStyleInfoHolder for style information that was modified in order to maximize a panel.
-
Field Summary
Fields Modifier and Type Field Description static StringUF_MAXIMIZED_PANELstatic StringUF_ROOT_CSS_CLASS
-
Constructor Summary
Constructors Constructor Description WorkbenchLayoutImpl()WorkbenchLayoutImpl(org.jboss.errai.ioc.client.container.SyncBeanManager iocManager, com.google.gwt.user.client.ui.HeaderPanel root, WorkbenchDragAndDropManager dndManager, UberfireDocksContainer uberfireDocksContainer, WorkbenchPickupDragController dragController, org.jboss.errai.common.client.dom.Div headerPanel, org.jboss.errai.common.client.dom.Div footerPanel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddWorkbenchProfileCssClass(WorkbenchProfileCssClass workbenchProfileCssClass)protected org.jboss.errai.common.client.dom.DivgetFooterPanel()protected org.jboss.errai.common.client.dom.DivgetHeaderPanel()com.google.gwt.user.client.ui.HasWidgetsgetPerspectiveContainer()Gives access to the element of the workbench that hosts perspective widgets.com.google.gwt.user.client.ui.HeaderPanelgetRoot()Gives access to the root container element that will be attached to theRootLayoutPanel.voidmaximize(com.google.gwt.user.client.ui.Widget w)Makes the given widget fill the entire space normally dedicated to the perspective container.voidmaximize(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.voidonBootstrap()Will be invoked by theWorkbenchwhen the discovery of header and footer elements is completed.voidonResize()TheWorkbenchlistens for resize events and hands them off to the layout.voidresizeTo(int width, int height)voidsetMarginWidgets(boolean isStandaloneMode, Set<String> headersToKeep)Will insert the implementations of Header and Footer in the Workbenchvoidunmaximize(com.google.gwt.user.client.ui.Widget w)Restores a previously maximized widget to its original size and position.voidunmaximize(com.google.gwt.user.client.ui.Widget w, org.uberfire.mvp.Command callback)Restores a previously maximized widget to its original size and position.
-
-
-
Field Detail
-
UF_MAXIMIZED_PANEL
public static final String UF_MAXIMIZED_PANEL
- See Also:
- Constant Field Values
-
UF_ROOT_CSS_CLASS
public static final String UF_ROOT_CSS_CLASS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WorkbenchLayoutImpl
public WorkbenchLayoutImpl()
-
WorkbenchLayoutImpl
@Inject public WorkbenchLayoutImpl(org.jboss.errai.ioc.client.container.SyncBeanManager iocManager, com.google.gwt.user.client.ui.HeaderPanel root, WorkbenchDragAndDropManager dndManager, UberfireDocksContainer uberfireDocksContainer, WorkbenchPickupDragController dragController, org.jboss.errai.common.client.dom.Div headerPanel, org.jboss.errai.common.client.dom.Div footerPanel)
-
-
Method Detail
-
getRoot
public com.google.gwt.user.client.ui.HeaderPanel getRoot()
Description copied from interface:WorkbenchLayoutGives access to the root container element that will be attached to theRootLayoutPanel.- Specified by:
getRootin interfaceWorkbenchLayout- Returns:
- the outer most workbench widget
-
getPerspectiveContainer
public com.google.gwt.user.client.ui.HasWidgets getPerspectiveContainer()
Description copied from interface:WorkbenchLayoutGives access to the element of the workbench that hosts perspective widgets.- Specified by:
getPerspectiveContainerin interfaceWorkbenchLayout- Returns:
- the perspective container element
-
onBootstrap
public void onBootstrap()
Description copied from interface:WorkbenchLayoutWill be invoked by theWorkbenchwhen the discovery of header and footer elements is completed.- Specified by:
onBootstrapin interfaceWorkbenchLayout
-
onResize
public void onResize()
Description copied from interface:WorkbenchLayoutTheWorkbenchlistens for resize events and hands them off to the layout. Not needed if your layout is based onLayoutPanel's. Kept for backwards compatibility.- Specified by:
onResizein interfaceWorkbenchLayout
-
resizeTo
public void resizeTo(int width, int height)Description copied from interface:WorkbenchLayout- Specified by:
resizeToin interfaceWorkbenchLayout
-
maximize
public void maximize(com.google.gwt.user.client.ui.Widget w)
Description copied from interface:WorkbenchLayoutMakes 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.- Specified by:
maximizein interfaceWorkbenchLayout- Parameters:
w- the Widget to maximize.
-
maximize
public void maximize(com.google.gwt.user.client.ui.Widget w, org.uberfire.mvp.Command callback)Description copied from interface:WorkbenchLayoutMakes 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.- Specified by:
maximizein interfaceWorkbenchLayout- Parameters:
w- the Widget to maximize.callback- A command to be executed after the maximization is fully completed.
-
unmaximize
public void unmaximize(com.google.gwt.user.client.ui.Widget w)
Description copied from interface:WorkbenchLayoutRestores 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 byWorkbenchLayout.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 toWorkbenchLayout.maximize(Widget).- Specified by:
unmaximizein interfaceWorkbenchLayout- Parameters:
w- the Widget to restore to its original size and location.
-
unmaximize
public void unmaximize(com.google.gwt.user.client.ui.Widget w, org.uberfire.mvp.Command callback)Description copied from interface:WorkbenchLayoutRestores 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 byWorkbenchLayout.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 toWorkbenchLayout.maximize(Widget).- Specified by:
unmaximizein interfaceWorkbenchLayout- 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
public void setMarginWidgets(boolean isStandaloneMode, Set<String> headersToKeep)Description copied from interface:WorkbenchLayoutWill insert the implementations of Header and Footer in the Workbench- Specified by:
setMarginWidgetsin interfaceWorkbenchLayout
-
addWorkbenchProfileCssClass
public void addWorkbenchProfileCssClass(@Observes WorkbenchProfileCssClass workbenchProfileCssClass)
-
getHeaderPanel
protected org.jboss.errai.common.client.dom.Div getHeaderPanel()
-
getFooterPanel
protected org.jboss.errai.common.client.dom.Div getFooterPanel()
-
-