@Dependent @Named(value="SplitLayoutPanelView") public class SplitLayoutPanelView extends Object implements WorkbenchPanelView<SplitLayoutPanelPresenter>
SplitLayoutPanelPresenter. Only supports panels, not parts.
Enforces lifecycle callbacks on center parts.
Since this panel cannot hold parts, it also does not support drag-and-drop of parts.
| Constructor and Description |
|---|
SplitLayoutPanelView() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPanel(PanelDefinition panel,
WorkbenchPanelView view,
Position position)
Nests the given WorkbenchPanelView inside this one at the given position, which must be unoccupied.
|
void |
addPart(WorkbenchPartPresenter.View view)
Adds the given part view to this panel if this panel does not already contain a view that handles the same
PlaceRequest as the given one. |
com.google.gwt.user.client.ui.Widget |
asWidget() |
void |
changeTitle(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.
|
com.google.gwt.user.client.ui.Widget |
getPartDropRegion()
Returns the widget that defines the boundaries of this panel view for purposes of drag-and-drop.
|
Collection<PartDefinition> |
getParts()
Returns the parts currently held by the view.
|
SplitLayoutPanelPresenter |
getPresenter()
Returns this view's presenter.
|
void |
init(SplitLayoutPanelPresenter presenter) |
void |
maximize()
Maximizes this view using
WorkbenchLayout.maximize(Widget). |
void |
onResize() |
boolean |
removePanel(WorkbenchPanelView<?> child)
Removes the view widget associated with the given child from this panel, freeing any resources that were
allocated by this panel when the child was added.
|
boolean |
removePart(PartDefinition part)
Removes the given part from this view, if it belonged to this view.
|
boolean |
selectPart(PartDefinition part)
Makes the given part visible and focused, if it belongs to this view.
|
void |
setElementId(String elementId)
Sets the ID of the physical root element of this view.
|
void |
setFocus(boolean hasFocus)
Informs this view that it has gained or lost keyboard focus.
|
void |
unmaximize()
Restores this view to its original unmaximized size and position using
WorkbenchLayout.unmaximize(Widget). |
public void addPanel(PanelDefinition panel, WorkbenchPanelView view, Position position)
WorkbenchPanelViewPosition types. Implementations should document whether or not they
support child panels, and if so, what types of Positions they understand.addPanel in interface WorkbenchPanelView<SplitLayoutPanelPresenter>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.public boolean removePanel(WorkbenchPanelView<?> child)
WorkbenchPanelViewremovePanel in interface WorkbenchPanelView<SplitLayoutPanelPresenter>public com.google.gwt.user.client.ui.Widget asWidget()
asWidget in interface com.google.gwt.user.client.ui.IsWidgetpublic void init(SplitLayoutPanelPresenter presenter)
init in interface HasPresenter<SplitLayoutPanelPresenter>public SplitLayoutPanelPresenter getPresenter()
WorkbenchPanelViewgetPresenter in interface WorkbenchPanelView<SplitLayoutPanelPresenter>HasPresenter.init(Object); afterward, the return value is never null.public void addPart(WorkbenchPartPresenter.View view)
WorkbenchPanelViewPlaceRequest as the given one. If this panel does already contain such a part, the existing one is
selected and the given one is not added.addPart in interface WorkbenchPanelView<SplitLayoutPanelPresenter>view - the view to add as long as it is not a duplicate. Must not be null.public boolean removePart(PartDefinition part)
WorkbenchPanelViewremovePart in interface WorkbenchPanelView<SplitLayoutPanelPresenter>part - the part to remove.public boolean selectPart(PartDefinition part)
WorkbenchPanelViewselectPart in interface WorkbenchPanelView<SplitLayoutPanelPresenter>part - the part to reveal and give focus to.public Collection<PartDefinition> getParts()
WorkbenchPanelViewgetParts in interface WorkbenchPanelView<SplitLayoutPanelPresenter>public com.google.gwt.user.client.ui.Widget getPartDropRegion()
WorkbenchPanelViewgetPartDropRegion in interface WorkbenchPanelView<SplitLayoutPanelPresenter>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.
public void setFocus(boolean hasFocus)
WorkbenchPanelViewsetFocus in interface WorkbenchPanelView<SplitLayoutPanelPresenter>hasFocus - if true, this panel now has focus. If false, this panel does not have focus.public void onResize()
onResize in interface com.google.gwt.user.client.ui.RequiresResizepublic void changeTitle(PartDefinition part, String title, com.google.gwt.user.client.ui.IsWidget titleDecoration)
WorkbenchPanelViewchangeTitle in interface WorkbenchPanelView<SplitLayoutPanelPresenter>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.public void setElementId(String elementId)
WorkbenchPanelViewid attribute 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.setElementId in interface WorkbenchPanelView<SplitLayoutPanelPresenter>elementId - the element ID to set. If null, the ID value will be cleared.public void maximize()
WorkbenchPanelViewWorkbenchLayout.maximize(Widget).maximize in interface WorkbenchPanelView<SplitLayoutPanelPresenter>public void unmaximize()
WorkbenchPanelViewWorkbenchLayout.unmaximize(Widget).unmaximize in interface WorkbenchPanelView<SplitLayoutPanelPresenter>Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.