@JsType
public interface PanelDefinition
Modifier and Type | Field and Description |
---|---|
static String |
PARENT_CHOOSES_TYPE
Special value for
getPanelType() . |
Modifier and Type | Method and Description |
---|---|
void |
addPart(PartDefinition part)
Specifies content that should be put in this panel's main display area when it is materialized.
|
PartDefinition |
addPart(String partSpec)
Specifies content that should be put in this panel's main display area when it is materialized.
|
void |
appendChild(PanelDefinition panel)
Append a Panel at the first empty child position.
|
void |
appendChild(Position position,
PanelDefinition panel)
Append a Panel at the first empty child position.
|
default String |
asString()
Invokes
#toString() but exported to JavaScript so it can be invoked from different scripts. |
PanelDefinition |
getChild(Position position)
Get the Panel's immediate child Panel at the given Position
|
List<PanelDefinition> |
getChildren()
Returns this panel's immediate child panels.
|
ContextDefinition |
getContextDefinition() |
ContextDisplayMode |
getContextDisplayMode() |
String |
getElementId()
Returns the DOM ID that will be given to a panel created from this definition.
|
Integer |
getHeight()
Get the height of the Panel in pixels
|
default int |
getHeightAsInt()
Get the height of this panel in pixels as a primitive int to make this method exportable to JS.
|
Integer |
getMinHeight()
Get the minimum height of this panel in pixels.
|
default int |
getMinHeightAsInt()
Get the minimum width of this panel in pixels as a primitive int to make this method exportable to JS.
|
Integer |
getMinWidth()
Get the minimum width of the Panel in pixels
|
default int |
getMinWidthAsInt()
Get the minimum width of this panel in pixels as a primitive int to make this method exportable to JS.
|
String |
getPanelType()
Specifies the WorkbenchPanelPresenter implementation that should be used when adding this panel to the UI.
|
PanelDefinition |
getParent()
Return the parent panel, or null if
isRoot() } returns true. |
Set<PartDefinition> |
getParts()
Get the Parts contained in the Panel
|
Position |
getPosition()
Get the Position of the Panel relate to it's Parent
TODO remove this. parent panels should track the positions of their children; making it a property of the child
is error-prone when moving panels around in the UI.
|
Integer |
getWidth()
Get the width of this panel in pixels.
|
default int |
getWidthAsInt()
Get the width of this panel in pixels as a primitive int to make this method exportable to JS.
|
void |
insertChild(Position position,
PanelDefinition panel)
Insert a Panel as an immediate child at the given Position.
|
boolean |
isMaximized()
Has the Panel been expanded to a maximum size
|
boolean |
isRoot()
Is this Panel the root of the Perspective definition
|
void |
removeChild(Position position)
Remove a child from the Panel
|
boolean |
removePart(PartDefinition part)
Removes the given part definition from this panel definition.
|
void |
setContextDefinition(ContextDefinition contextDefinition) |
void |
setContextDisplayMode(ContextDisplayMode contextDisplayMode) |
void |
setElementId(String id)
Specifies the DOM ID that should be given to the live panel's element.
|
default void |
setHeight(int height)
Set the height of this panel in pixels using a primitive int to make this method exportable to JS.
|
void |
setHeight(Integer height)
Set the height of this panel in pixels.
|
void |
setMinHeight(Integer minHeight)
Set the minimum height of the Panel in pixels
|
void |
setMinWidth(Integer minWidth)
Set the minimum width of the Panel in pixels
|
void |
setPanelType(String fqcn)
Specifies the WorkbenchPanelPresenter implementation that should be used when adding this panel to the UI.
|
void |
setPosition(Position position)
Set the Position of the Panel relative to it's parent.
|
default void |
setWidth(int width)
Set the width of this panel in pixels using a primitive int to make this method exportable to JS.
|
void |
setWidth(Integer width)
Set the width of this panel in pixels.
|
static final String PARENT_CHOOSES_TYPE
getPanelType()
. When adding a new child panel to a parent panel, if the child panel
has this type, the parent can create any type of PanelPresenter it likes. Typically, each panel type will have
some constant default child type that it uses in this scenario.String getElementId()
void setElementId(String id)
id
- the DOM ID to give the panel when it is created. If null, no ID will be set on the panel.void addPart(PartDefinition part)
PlaceRequest
that identifies a
WorkbenchActivity (either a screen or an editor).
If the given part already belongs to an existing panel, it will be removed from that panel by a call to removePart(part).
part
- The Part to add. Must not be null. The part's place must specify a WorkbenchActivity bean.@JsMethod(name="addPartById") PartDefinition addPart(String partSpec)
This is a convenience method equivalent to addPart(new PartDefinitionImpl(DefaultPlaceRequest.parse(partSpec))).
partSpec
- An PlaceRequest ID with optional parameters, encoded as specified in
DefaultPlaceRequest.parse(CharSequence)
. Must not be null. The place ID must specify a
WorkbenchActivity bean (either a screen or an editor).boolean removePart(PartDefinition part)
part
- The Part to be removedSet<PartDefinition> getParts()
List<PanelDefinition> getChildren()
void insertChild(Position position, PanelDefinition panel)
position
- The Position to add the childpanel
- The child Panel@JsMethod(name="appendChildAtPosition") void appendChild(Position position, PanelDefinition panel)
position
- The Position to add the childpanel
- The child Panelvoid appendChild(PanelDefinition panel)
panel
- The child PanelPanelDefinition getParent()
isRoot()
} returns true.PanelDefinition getChild(Position position)
position
- The child Panel's Positionvoid removeChild(Position position)
position
- boolean isRoot()
String getPanelType()
PARENT_CHOOSES_TYPE
.void setPanelType(String fqcn)
fqcn
- fully-qualified class name of the WorkbenchPanelPresenter implementation to use. Must not be null, but
may be the special value PARENT_CHOOSES_TYPE
.@JsIgnore Integer getHeight()
default void setHeight(int height)
width
- The width to set.default int getHeightAsInt()
@JsIgnore void setHeight(Integer height)
height
- The height to set. If null, the existing height value is retained.@JsIgnore Integer getWidth()
default void setWidth(int width)
width
- The width to set.default int getWidthAsInt()
@JsIgnore void setWidth(Integer width)
width
- The width to set. If null, the existing width value is retained.@JsIgnore Integer getMinHeight()
@JsIgnore void setMinHeight(Integer minHeight)
minHeight
- The minimum height, or null if not setdefault int getMinHeightAsInt()
@JsIgnore Integer getMinWidth()
@JsIgnore void setMinWidth(Integer minWidth)
minWidth
- The width, or null if not setdefault int getMinWidthAsInt()
Position getPosition()
TODO remove this. parent panels should track the positions of their children; making it a property of the child is error-prone when moving panels around in the UI.
void setPosition(Position position)
TODO remove this. parent panels should track the positions of their children; making it a property of the child is error-prone when moving panels around in the UI.
position
- The Position of the Panel relative to it's parentboolean isMaximized()
ContextDefinition getContextDefinition()
void setContextDefinition(ContextDefinition contextDefinition)
ContextDisplayMode getContextDisplayMode()
void setContextDisplayMode(ContextDisplayMode contextDisplayMode)
default String asString()
#toString()
but exported to JavaScript so it can be invoked from different scripts.Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.