Class AbstractSimpleWorkbenchPanelView<P extends WorkbenchPanelPresenter>
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Composite
-
- com.google.gwt.user.client.ui.ResizeComposite
-
- org.uberfire.client.workbench.panels.impl.AbstractWorkbenchPanelView<P>
-
- org.uberfire.client.workbench.panels.impl.AbstractDockingWorkbenchPanelView<P>
-
- org.uberfire.client.workbench.panels.impl.AbstractSimpleWorkbenchPanelView<P>
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers,com.google.gwt.event.shared.HasHandlers,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.IsRenderable,com.google.gwt.user.client.ui.IsWidget,com.google.gwt.user.client.ui.RequiresResize,org.uberfire.client.mvp.HasPresenter<P>,org.uberfire.client.mvp.UberView<P>,DockingWorkbenchPanelView<P>,WorkbenchPanelView<P>
- Direct Known Subclasses:
AdaptiveWorkbenchPanelView,ClosableSimpleWorkbenchPanelView,SimpleDnDWorkbenchPanelView,SimpleNoExpandWorkbenchPanelView,SimpleWorkbenchPanelView
public abstract class AbstractSimpleWorkbenchPanelView<P extends WorkbenchPanelPresenter> extends AbstractDockingWorkbenchPanelView<P>
Supertype for both the DnD and non-DnD simple workbench panel views.
-
-
Field Summary
Fields Modifier and Type Field Description protected ListBarWidgetlistBar-
Fields inherited from class org.uberfire.client.workbench.panels.impl.AbstractDockingWorkbenchPanelView
dndManager, factory
-
Fields inherited from class org.uberfire.client.workbench.panels.impl.AbstractWorkbenchPanelView
layoutSelection, panelManager, presenter
-
-
Constructor Summary
Constructors Constructor Description AbstractSimpleWorkbenchPanelView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPart(WorkbenchPartPresenter.View view)Adds the given part view to this panel if this panel does not already contain a view that handles the samePlaceRequestas the given one.voidchangeTitle(org.uberfire.workbench.model.PartDefinition part, String title, com.google.gwt.user.client.ui.IsWidget titleDecoration)Assigns the given title to the given part, if the part belongs to this panel.voidenableDnd()Collection<org.uberfire.workbench.model.PartDefinition>getParts()Returns the parts currently held by the view.PgetPresenter()Returns this view's presenter.voidinit(P presenter)voidmaximize()Overridden to maximize the widget returned byAbstractDockingWorkbenchPanelView.getPartViewContainer().voidonResize()booleanremovePart(org.uberfire.workbench.model.PartDefinition part)Removes the given part from this view, if it belonged to this view.booleanselectPart(org.uberfire.workbench.model.PartDefinition part)Makes the given part visible and focused, if it belongs to this view.voidsetElementId(String elementId)Overridden to attach the ID to the part container rather than the top-level widget, which may contain sub-panels and be larger and further up the DOM tree than desired.voidsetFocus(boolean hasFocus)Informs this view that it has gained or lost keyboard focus.protected voidsetupListBar()voidunmaximize()Overridden to matchAbstractDockingWorkbenchPanelView.maximize().-
Methods inherited from class org.uberfire.client.workbench.panels.impl.AbstractDockingWorkbenchPanelView
addPanel, getPartDropRegion, getPartViewContainer, getWidget, removePanel, setChildSize
-
Methods inherited from class org.uberfire.client.workbench.panels.impl.AbstractWorkbenchPanelView
addOnFocusHandler, addSelectionHandler, toString
-
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, initializeClaimedElement, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent
-
-
-
-
Field Detail
-
listBar
@Inject protected ListBarWidget listBar
-
-
Method Detail
-
setupListBar
protected void setupListBar()
-
enableDnd
public void enableDnd()
-
init
public void init(P presenter)
-
getPresenter
public P getPresenter()
Description copied from interface:WorkbenchPanelViewReturns this view's presenter.- Specified by:
getPresenterin interfaceWorkbenchPanelView<P extends WorkbenchPanelPresenter>- Overrides:
getPresenterin classAbstractWorkbenchPanelView<P extends WorkbenchPanelPresenter>- Returns:
- the presenter that this view is bound to. Will return null if invoked before the presenter calls
HasPresenter.init(Object); afterward, the return value is never null.
-
addPart
public void addPart(WorkbenchPartPresenter.View view)
Description copied from interface:WorkbenchPanelViewAdds the given part view to this panel if this panel does not already contain a view that handles the samePlaceRequestas the given one. If this panel does already contain such a part, the existing one isselectedand the given one is not added.- Parameters:
view- the view to add as long as it is not a duplicate. Must not be null.
-
changeTitle
public void changeTitle(org.uberfire.workbench.model.PartDefinition part, String title, com.google.gwt.user.client.ui.IsWidget titleDecoration)Description copied from interface:WorkbenchPanelViewAssigns the given title to the given part, if the part belongs to this panel.- 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:WorkbenchPanelViewMakes the given part visible and focused, if it belongs to this view.- 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:WorkbenchPanelViewRemoves the given part from this view, if it belonged to this view.- Parameters:
part- the part to remove.- Returns:
- true if the part was found and removed. False if not.
-
setFocus
public void setFocus(boolean hasFocus)
Description copied from interface:WorkbenchPanelViewInforms 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.- Parameters:
hasFocus- if true, this panel now has focus. If false, this panel does not have focus.
-
onResize
public void onResize()
- Specified by:
onResizein interfacecom.google.gwt.user.client.ui.RequiresResize- Overrides:
onResizein classcom.google.gwt.user.client.ui.ResizeComposite
-
maximize
public void maximize()
Description copied from class:AbstractDockingWorkbenchPanelViewOverridden to maximize the widget returned byAbstractDockingWorkbenchPanelView.getPartViewContainer().- Specified by:
maximizein interfaceWorkbenchPanelView<P extends WorkbenchPanelPresenter>- Overrides:
maximizein classAbstractDockingWorkbenchPanelView<P extends WorkbenchPanelPresenter>
-
unmaximize
public void unmaximize()
Description copied from class:AbstractDockingWorkbenchPanelViewOverridden to matchAbstractDockingWorkbenchPanelView.maximize().- Specified by:
unmaximizein interfaceWorkbenchPanelView<P extends WorkbenchPanelPresenter>- Overrides:
unmaximizein classAbstractDockingWorkbenchPanelView<P extends WorkbenchPanelPresenter>
-
setElementId
public void setElementId(String elementId)
Description copied from class:AbstractDockingWorkbenchPanelViewOverridden to attach the ID to the part container rather than the top-level widget, which may contain sub-panels and be larger and further up the DOM tree than desired.- Specified by:
setElementIdin interfaceWorkbenchPanelView<P extends WorkbenchPanelPresenter>- Overrides:
setElementIdin classAbstractDockingWorkbenchPanelView<P extends WorkbenchPanelPresenter>- Parameters:
elementId- the element ID to set. If null, the ID value will be cleared.
-
getParts
public Collection<org.uberfire.workbench.model.PartDefinition> getParts()
Description copied from interface:WorkbenchPanelViewReturns the parts currently held by the view.
-
-