|
GWT 2.0.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.HorizontalSplitPanel
public final class HorizontalSplitPanel
A panel that arranges two widgets in a single horizontal row and allows the
user to interactively change the proportion of the width dedicated to each of
the two widgets. Widgets contained within a HorizontalSplitPanel
will be automatically decorated with scrollbars when necessary.
This widget will only work in quirks mode. If your application is in
Standards Mode, use SplitLayoutPanel
instead.
SplitLayoutPanel
Nested Class Summary | |
---|---|
static interface |
HorizontalSplitPanel.Resources
The default resources used by this widget. |
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
HorizontalSplitPanel()
|
|
HorizontalSplitPanel(HorizontalSplitPanel.Resources resources)
Creates an empty horizontal split panel. |
|
HorizontalSplitPanel(HorizontalSplitPanelImages images)
Deprecated. replaced by HorizontalSplitPanel(Resources) |
Method Summary | |
---|---|
void |
add(Widget w)
Adds a widget to a pane in the HorizontalSplitPanel. |
protected Element |
getElement(int index)
Gets the content element for the given index. |
Widget |
getEndOfLineWidget()
Gets the widget in the pane that is at the end of the line direction for the layout. |
Widget |
getLeftWidget()
Gets the widget in the left side of the panel. |
Widget |
getRightWidget()
Gets the widget in the right side of the panel. |
protected Element |
getSplitElement()
Gets the element that is acting as the splitter. |
Widget |
getStartOfLineWidget()
Gets the widget in the pane that is at the start of the line direction for the layout. |
protected Widget |
getWidget(int index)
Gets one of the contained widgets. |
boolean |
isResizing()
Indicates whether the split panel is being resized. |
java.util.Iterator<Widget> |
iterator()
Gets an iterator for the contained widgets. |
void |
onBrowserEvent(Event event)
Fired whenever a browser event is received. |
protected void |
onEnsureDebugId(java.lang.String baseID)
Affected Elements: -splitter = the container containing the splitter element. -right = the container on the right side of the splitter. -left = the container on the left side of the splitter. |
protected void |
onLoad()
A Panel's onLoad method will be called after all of its children are attached. |
protected void |
onUnload()
A Panel's onUnload method will be called before its children become detached themselves. |
boolean |
remove(Widget widget)
Removes a child widget. |
void |
setEndOfLineWidget(Widget w)
Sets the widget in the pane that is at the end of the line direction for the layout. |
void |
setLeftWidget(Widget w)
Sets the widget in the left side of the panel. |
void |
setRightWidget(Widget w)
Sets the widget in the right side of the panel. |
void |
setSplitPosition(java.lang.String pos)
Moves the position of the splitter. |
void |
setStartOfLineWidget(Widget w)
Sets the widget in the pane that is at the start of the line direction for the layout. |
protected void |
setWidget(int index,
Widget w)
Sets one of the contained widgets. |
Methods inherited from class com.google.gwt.user.client.ui.Panel |
---|
adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addDomHandler, addHandler, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HorizontalSplitPanel()
@Deprecated public HorizontalSplitPanel(HorizontalSplitPanelImages images)
HorizontalSplitPanel(Resources)
images
- ImageBundle containing an image for the splitter's drag thumbpublic HorizontalSplitPanel(HorizontalSplitPanel.Resources resources)
resources
- ClientBundle containing an image for the splitter's drag
thumbMethod Detail |
---|
public void add(Widget w)
add
in interface HasWidgets
w
- the widget to be added
java.lang.IllegalStateException
HasWidgets.add(Widget)
public Widget getEndOfLineWidget()
null
if there is not one.public Widget getLeftWidget()
null
if there is not one.public Widget getRightWidget()
null
if there is not one.public Widget getStartOfLineWidget()
null
if there is not one.public void setEndOfLineWidget(Widget w)
w
- the widgetpublic void setLeftWidget(Widget w)
w
- the widgetpublic void setRightWidget(Widget w)
w
- the widgetpublic void setSplitPosition(java.lang.String pos)
pos
- the new size of the left region in CSS units (e.g. "10px",
"1em")public void setStartOfLineWidget(Widget w)
w
- the widgetprotected void onEnsureDebugId(java.lang.String baseID)
baseID
- the base ID used by the main elementUIObject.onEnsureDebugId(String)
protected void onLoad()
Panel
onLoad
in class Panel
Widget.onLoad()
protected void onUnload()
Panel
onUnload
in class Panel
Widget.onLoad()
public boolean isResizing()
true
if the user is dragging the splitter,
false
otherwisepublic java.util.Iterator<Widget> iterator()
HasWidgets
Iterator.remove()
.
public void onBrowserEvent(Event event)
EventListener
onBrowserEvent
in interface EventListener
onBrowserEvent
in class Widget
event
- the event receivedpublic boolean remove(Widget widget)
Panel
How to Override this Method
There are several important things that must take place in the correct order to properly remove a Widget from a Panel. Not all of these steps will be relevant to every Panel, but all of the steps must be considered.
false
if it is not.Panel.orphan(Widget)
first while the child
Widget is still attached.WidgetCollection
.
remove
in interface HasWidgets
remove
in class Panel
widget
- the widget to be removed
true
if the child was presentprotected Element getElement(int index)
index
- the index of the element, only 0 and 1 are valid.
protected Element getSplitElement()
protected Widget getWidget(int index)
index
- the index of the widget, only 0 and 1 are valid.
protected final void setWidget(int index, Widget w)
index
- the index, only 0 and 1 are validw
- the widget
|
GWT 2.0.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |