@Dependent @Named(value="TemplatedWorkbenchPanelView") public class TemplatedWorkbenchPanelView extends Object implements WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>
NamedPosition.
This view does not support having parts added to it directly, so it also does not support drag-and-drop of parts.
TemplatedWorkbenchPanelPresenter,
WorkbenchPanel| Constructor and Description |
|---|
TemplatedWorkbenchPanelView() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPanel(org.uberfire.workbench.model.PanelDefinition panel,
WorkbenchPanelView<?> view,
org.uberfire.workbench.model.Position p)
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(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.
|
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<org.uberfire.workbench.model.PartDefinition> |
getParts()
Returns the parts currently held by the view.
|
TemplatedWorkbenchPanelPresenter |
getPresenter()
Returns this view's presenter.
|
void |
init(TemplatedWorkbenchPanelPresenter 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(org.uberfire.workbench.model.PartDefinition part)
Removes the given part from this view, if it belonged to this view.
|
boolean |
selectPart(org.uberfire.workbench.model.PartDefinition part)
Makes the given part visible and focused, if it belongs to this view.
|
void |
setActivity(TemplatedActivity activity) |
void |
setElementId(String elementId)
Will set, but not clear, the ID of the activity's root element.
|
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 init(TemplatedWorkbenchPanelPresenter presenter)
init in interface UberView<TemplatedWorkbenchPanelPresenter>public void setActivity(TemplatedActivity activity)
public com.google.gwt.user.client.ui.Widget asWidget()
asWidget in interface com.google.gwt.user.client.ui.IsWidgetpublic void onResize()
onResize in interface com.google.gwt.user.client.ui.RequiresResizepublic TemplatedWorkbenchPanelPresenter getPresenter()
WorkbenchPanelViewgetPresenter in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>UberView.init(Object); afterward, the return value is never null.public void addPanel(org.uberfire.workbench.model.PanelDefinition panel,
WorkbenchPanelView<?> view,
org.uberfire.workbench.model.Position p)
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<TemplatedWorkbenchPanelPresenter>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.p - 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<TemplatedWorkbenchPanelPresenter>public void setFocus(boolean hasFocus)
WorkbenchPanelViewsetFocus in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>hasFocus - if true, this panel now has focus. If false, this panel does not have focus.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<TemplatedWorkbenchPanelPresenter>view - the view to add as long as it is not a duplicate. Must not be null.public Collection<org.uberfire.workbench.model.PartDefinition> getParts()
WorkbenchPanelViewgetParts in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>public void changeTitle(org.uberfire.workbench.model.PartDefinition part,
String title,
com.google.gwt.user.client.ui.IsWidget titleDecoration)
WorkbenchPanelViewchangeTitle in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>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 boolean selectPart(org.uberfire.workbench.model.PartDefinition part)
WorkbenchPanelViewselectPart in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>part - the part to reveal and give focus to.public boolean removePart(org.uberfire.workbench.model.PartDefinition part)
WorkbenchPanelViewremovePart in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>part - the part to remove.public com.google.gwt.user.client.ui.Widget getPartDropRegion()
WorkbenchPanelViewgetPartDropRegion in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>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 setElementId(String elementId)
setElementId in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>elementId - the element ID to set. If null, the ID value will be cleared.public void maximize()
WorkbenchPanelViewWorkbenchLayout.maximize(Widget).maximize in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>public void unmaximize()
WorkbenchPanelViewWorkbenchLayout.unmaximize(Widget).unmaximize in interface WorkbenchPanelView<TemplatedWorkbenchPanelPresenter>Copyright © 2012–2017 JBoss by Red Hat. All rights reserved.