@Portable @JsType public class PanelDefinitionImpl extends Object implements PanelDefinition
PARENT_CHOOSES_TYPE
Constructor and Description |
---|
PanelDefinitionImpl() |
PanelDefinitionImpl(String type) |
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.
|
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
|
Integer |
getMinHeight()
Get the minimum height of this panel in pixels.
|
Integer |
getMinWidth()
Get the minimum width of the Panel in pixels
|
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
PanelDefinition.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.
|
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.
|
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 |
setParent(PanelDefinition parent) |
void |
setPosition(Position position)
Set the Position of the Panel relative to it's parent.
|
void |
setRoot(boolean isRoot) |
void |
setWidth(Integer width)
Set the width of this panel in pixels.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asString, getHeightAsInt, getMinHeightAsInt, getMinWidthAsInt, getWidthAsInt, setHeight, setWidth
@JsIgnore public PanelDefinitionImpl()
@JsIgnore public PanelDefinitionImpl(String type)
public PanelDefinition getParent()
PanelDefinition
PanelDefinition.isRoot()
} returns true.getParent
in interface PanelDefinition
public void setParent(PanelDefinition parent)
public String getElementId()
PanelDefinition
getElementId
in interface PanelDefinition
public void setElementId(String id)
PanelDefinition
setElementId
in interface PanelDefinition
id
- the DOM ID to give the panel when it is created. If null, no ID will be set on the panel.public void addPart(PartDefinition part)
PanelDefinition
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).
addPart
in interface PanelDefinition
part
- The Part to add. Must not be null. The part's place must specify a WorkbenchActivity bean.public PartDefinition addPart(String partSpec)
PanelDefinition
This is a convenience method equivalent to addPart(new PartDefinitionImpl(DefaultPlaceRequest.parse(partSpec))).
addPart
in interface PanelDefinition
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).public boolean removePart(PartDefinition part)
PanelDefinition
removePart
in interface PanelDefinition
part
- The Part to be removed@JsIgnore public Set<PartDefinition> getParts()
PanelDefinition
getParts
in interface PanelDefinition
@JsIgnore public List<PanelDefinition> getChildren()
PanelDefinition
getChildren
in interface PanelDefinition
public void insertChild(Position position, PanelDefinition panel)
PanelDefinition
insertChild
in interface PanelDefinition
position
- The Position to add the childpanel
- The child Panelpublic void appendChild(Position position, PanelDefinition panel)
PanelDefinition
appendChild
in interface PanelDefinition
position
- The Position to add the childpanel
- The child Panelpublic void appendChild(PanelDefinition panel)
PanelDefinition
appendChild
in interface PanelDefinition
panel
- The child Panelpublic PanelDefinition getChild(Position position)
PanelDefinition
getChild
in interface PanelDefinition
position
- The child Panel's Positionpublic void removeChild(Position position)
PanelDefinition
removeChild
in interface PanelDefinition
public boolean isRoot()
PanelDefinition
isRoot
in interface PanelDefinition
public void setRoot(boolean isRoot)
public String getPanelType()
PanelDefinition
getPanelType
in interface PanelDefinition
PanelDefinition.PARENT_CHOOSES_TYPE
.public void setPanelType(String fqcn)
PanelDefinition
setPanelType
in interface PanelDefinition
fqcn
- fully-qualified class name of the WorkbenchPanelPresenter implementation to use. Must not be null, but
may be the special value PanelDefinition.PARENT_CHOOSES_TYPE
.@JsIgnore public Integer getHeight()
PanelDefinition
getHeight
in interface PanelDefinition
@JsIgnore public void setHeight(Integer height)
PanelDefinition
setHeight
in interface PanelDefinition
height
- The height to set. If null, the existing height value is retained.@JsIgnore public Integer getWidth()
PanelDefinition
getWidth
in interface PanelDefinition
@JsIgnore public void setWidth(Integer width)
PanelDefinition
setWidth
in interface PanelDefinition
width
- The width to set. If null, the existing width value is retained.@JsIgnore public final Integer getMinHeight()
PanelDefinition
getMinHeight
in interface PanelDefinition
@JsIgnore public final void setMinHeight(Integer minHeight)
PanelDefinition
setMinHeight
in interface PanelDefinition
minHeight
- The minimum height, or null if not set@JsIgnore public final Integer getMinWidth()
PanelDefinition
getMinWidth
in interface PanelDefinition
@JsIgnore public final void setMinWidth(Integer minWidth)
PanelDefinition
setMinWidth
in interface PanelDefinition
minWidth
- The width, or null if not setpublic final Position getPosition()
PanelDefinition
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.
getPosition
in interface PanelDefinition
public void setPosition(Position position)
PanelDefinition
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.
setPosition
in interface PanelDefinition
position
- The Position of the Panel relative to it's parentpublic boolean isMaximized()
PanelDefinition
isMaximized
in interface PanelDefinition
public ContextDefinition getContextDefinition()
getContextDefinition
in interface PanelDefinition
public void setContextDefinition(ContextDefinition contextDefinition)
setContextDefinition
in interface PanelDefinition
public ContextDisplayMode getContextDisplayMode()
getContextDisplayMode
in interface PanelDefinition
public void setContextDisplayMode(ContextDisplayMode contextDisplayMode)
setContextDisplayMode
in interface PanelDefinition
Copyright © 2012–2018 JBoss by Red Hat. All rights reserved.