public class SimpleDock
extends ej.mwt.Container
The three children are laid out on the same horizontal or vertical line, one at the center and the two others on each side.
In a horizontal simple dock, the first and last widgets will have the height of the available space and will have their optimal width. In a vertical simple dock, the first and last widgets will have the width of the available space and will have their optimal height. Regardless of the orientation of the simple dock, the center widget will have the size of the remaining space.
Horizontal:
Vertical:

| Constructor and Description |
|---|
SimpleDock(boolean orientation)
Creates a simple dock specifying its orientation.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeContentOptimalSize(ej.mwt.util.Size size) |
ej.mwt.Widget |
getCenterChild()
Gets the center widget of this simple dock.
|
ej.mwt.Widget |
getFirstChild()
Gets the first widget of this simple dock.
|
ej.mwt.Widget |
getLastChild()
Gets the last widget of this simple dock.
|
boolean |
getOrientation()
Gets the orientation of this simple dock.
|
protected void |
layOutChildren(int contentWidth,
int contentHeight) |
void |
removeAllChildren() |
void |
removeChild(ej.mwt.Widget widget) |
void |
setCenterChild(ej.mwt.Widget child)
Sets the center widget of this simple dock.
|
void |
setFirstChild(ej.mwt.Widget child)
Sets the first widget of this simple dock.
|
void |
setLastChild(ej.mwt.Widget child)
Sets the last widget of this simple dock.
|
void |
setOrientation(boolean orientation)
Sets the orientation of this simple dock.
|
addChild, changeChildIndex, computeChildOptimalSize, getChild, getChildIndex, getChildren, getChildrenCount, getContentBounds, getContentHeight, getContentWidth, getContentX, getContentY, getWidgetAt, insertChild, layOutChild, renderChild, renderContent, replaceChild, setHiddenChild, setHiddenChildren, setShownChild, setShownChildren, updateStyleaddClassSelector, contains, containsWidget, getAbsoluteX, getAbsoluteY, getDesktop, getHeight, getParent, getStyle, getWidth, getX, getY, handleEvent, hasClassSelector, isAttached, isEnabled, isInState, isShown, isTransparent, onAttached, onDetached, onHidden, onLaidOut, onShown, removeAllClassSelectors, removeClassSelector, render, requestLayOut, requestRender, requestRender, setClassSelectors, setEnabled, setPosition, setStylepublic SimpleDock(boolean orientation)
orientation - the orientation of the simple dock (see LayoutOrientation).public void setOrientation(boolean orientation)
orientation - the orientation to set (see LayoutOrientation).public boolean getOrientation()
LayoutOrientation).public void setFirstChild(ej.mwt.Widget child)
child - the widget to add.java.lang.NullPointerException - if the given widget is null.java.lang.IllegalArgumentException - if the specified widget is already in a hierarchy (already contained in a container or desktop).Container.addChild(Widget)@Nullable public ej.mwt.Widget getFirstChild()
null is it has not been set.public void setLastChild(ej.mwt.Widget child)
child - the widget to add.java.lang.NullPointerException - if the given widget is null.java.lang.IllegalArgumentException - if the specified widget is already in a hierarchy (already contained in a container or desktop).Container.addChild(Widget)@Nullable public ej.mwt.Widget getLastChild()
null is it has not been set.public void setCenterChild(ej.mwt.Widget child)
child - the widget to add.java.lang.NullPointerException - if the given widget is null.java.lang.IllegalArgumentException - if the specified widget is already in a hierarchy (already contained in a container or desktop).Container.addChild(Widget)@Nullable public ej.mwt.Widget getCenterChild()
null is it has not been set.public void removeChild(ej.mwt.Widget widget)
removeChild in class ej.mwt.Containerpublic void removeAllChildren()
removeAllChildren in class ej.mwt.Containerprotected void computeContentOptimalSize(ej.mwt.util.Size size)
computeContentOptimalSize in class ej.mwt.Widgetprotected void layOutChildren(int contentWidth,
int contentHeight)
layOutChildren in class ej.mwt.Container