Class AbstractWorkbenchPanelView<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>
-
- Type Parameters:
P- the type of presenter this view goes with
- 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>,WorkbenchPanelView<P>
- Direct Known Subclasses:
AbstractDockingWorkbenchPanelView,ImmutableWorkbenchPanelView,StaticWorkbenchPanelView,UnanchoredStaticWorkbenchPanelView
public abstract class AbstractWorkbenchPanelView<P extends WorkbenchPanelPresenter> extends com.google.gwt.user.client.ui.ResizeComposite implements WorkbenchPanelView<P>
Implements focus and selection handling.
-
-
Field Summary
Fields Modifier and Type Field Description protected LayoutSelectionlayoutSelectionprotected PanelManagerpanelManagerprotected Ppresenter
-
Constructor Summary
Constructors Constructor Description AbstractWorkbenchPanelView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddOnFocusHandler(MultiPartWidget widget)voidaddPanel(org.uberfire.workbench.model.PanelDefinition panel, WorkbenchPanelView<?> view, org.uberfire.workbench.model.Position position)ThrowsUnsupportedOperationExceptionwhen called.protected voidaddSelectionHandler(com.google.gwt.event.logical.shared.HasSelectionHandlers<org.uberfire.workbench.model.PartDefinition> widget)com.google.gwt.user.client.ui.WidgetgetPartDropRegion()This implementation returns null, meaning this panel does not support parts being dropped on it.PgetPresenter()Returns this view's presenter.voidmaximize()Maximizes this view usingWorkbenchLayout.maximize(Widget).booleanremovePanel(WorkbenchPanelView<?> child)ThrowsUnsupportedOperationExceptionwhen called.voidsetElementId(String elementId)Sets the ID of the physical root element of this view.StringtoString()voidunmaximize()Restores this view to its original unmaximized size and position usingWorkbenchLayout.unmaximize(Widget).-
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.uberfire.client.workbench.panels.WorkbenchPanelView
addPart, changeTitle, getParts, removePart, selectPart, setFocus
-
-
-
-
Field Detail
-
panelManager
@Inject protected PanelManager panelManager
-
layoutSelection
@Inject protected LayoutSelection layoutSelection
-
presenter
protected P extends WorkbenchPanelPresenter presenter
-
-
Method Detail
-
addPanel
public void addPanel(org.uberfire.workbench.model.PanelDefinition panel, WorkbenchPanelView<?> view, org.uberfire.workbench.model.Position position)ThrowsUnsupportedOperationExceptionwhen called. Subclasses that wish to support child panels should override this andremovePanel(WorkbenchPanelView).- Specified by:
addPanelin interfaceWorkbenchPanelView<P extends WorkbenchPanelPresenter>- 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.position- specifies which edge of this panel will be shared with the nested panel. Must not be null.
-
removePanel
public boolean removePanel(WorkbenchPanelView<?> child)
ThrowsUnsupportedOperationExceptionwhen called. Subclasses that wish to support child panels should override this andaddPanel(PanelDefinition, WorkbenchPanelView, Position).- Specified by:
removePanelin interfaceWorkbenchPanelView<P extends WorkbenchPanelPresenter>
-
getPresenter
public P getPresenter()
Description copied from interface:WorkbenchPanelViewReturns this view's presenter.- Specified by:
getPresenterin interfaceWorkbenchPanelView<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.
-
addOnFocusHandler
protected void addOnFocusHandler(MultiPartWidget widget)
-
addSelectionHandler
protected void addSelectionHandler(com.google.gwt.event.logical.shared.HasSelectionHandlers<org.uberfire.workbench.model.PartDefinition> widget)
-
setElementId
public void setElementId(String elementId)
Description copied from interface:WorkbenchPanelViewSets the ID of the physical root element of this view. For HTML-based views, this is theidattribute of the view's top-level DOM element. Implementations for other view technologies should map this to whatever the underlying widget/component system uses for unique identifiers.- Specified by:
setElementIdin interfaceWorkbenchPanelView<P extends WorkbenchPanelPresenter>- Parameters:
elementId- the element ID to set. If null, the ID value will be cleared.
-
toString
public String toString()
- Overrides:
toStringin classcom.google.gwt.user.client.ui.UIObject
-
getPartDropRegion
public com.google.gwt.user.client.ui.Widget getPartDropRegion()
This implementation returns null, meaning this panel does not support parts being dropped on it. Subclasses that want to support Drag-and-Drop can override.- Specified by:
getPartDropRegionin interfaceWorkbenchPanelView<P extends WorkbenchPanelPresenter>- 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.
-
maximize
public void maximize()
Description copied from interface:WorkbenchPanelViewMaximizes this view usingWorkbenchLayout.maximize(Widget).- Specified by:
maximizein interfaceWorkbenchPanelView<P extends WorkbenchPanelPresenter>
-
unmaximize
public void unmaximize()
Description copied from interface:WorkbenchPanelViewRestores this view to its original unmaximized size and position usingWorkbenchLayout.unmaximize(Widget).- Specified by:
unmaximizein interfaceWorkbenchPanelView<P extends WorkbenchPanelPresenter>
-
-