SplitLayoutPanel
instead, but understand that it is
not a drop in replacement for this class. It requires standards
mode, and is most easily used under a RootLayoutPanel
(as
opposed to a RootPanel
@Deprecated abstract class SplitPanel extends Panel
HorizontalSplitPanel
and
VerticalSplitPanel
.UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
HasWidgets.ForIsWidget
eventsToSink
DEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR
Constructor and Description |
---|
SplitPanel(Element mainElem,
Element splitElem,
Element headElem,
Element tailElem)
Deprecated.
Initializes the split panel.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Widget w)
Deprecated.
Adds a child widget.
|
(package private) static void |
addAbsolutePositoning(Element elem)
Deprecated.
Sets an elements positioning to absolute.
|
(package private) static void |
addClipping(Element elem)
Deprecated.
Adds clipping to an element.
|
(package private) static void |
addScrolling(Element elem)
Deprecated.
Adds as-needed scrolling to an element.
|
(package private) static void |
expandToFitParentUsingCssOffsets(Element elem)
Deprecated.
Sizes and element to consume the full area of its parent using the CSS
properties left, right, top, and bottom.
|
(package private) static void |
expandToFitParentUsingPercentages(Element elem)
Deprecated.
Sizes an element to consume the full areas of its parent using 100% width
and height.
|
protected Element |
getElement(int index)
Deprecated.
Gets the content element for the given index.
|
(package private) static int |
getOffsetHeight(Element elem)
Deprecated.
Returns the offsetHeight element property.
|
(package private) static int |
getOffsetWidth(Element elem)
Deprecated.
Returns the offsetWidth element property.
|
protected Element |
getSplitElement()
Deprecated.
Gets the element that is acting as the splitter.
|
protected Widget |
getWidget(int index)
Deprecated.
Gets one of the contained widgets.
|
boolean |
isResizing()
Deprecated.
Indicates whether the split panel is being resized.
|
java.util.Iterator<Widget> |
iterator()
Deprecated.
Gets an iterator for the contained widgets.
|
void |
onBrowserEvent(Event event)
Deprecated.
Fired whenever a browser event is received.
|
protected void |
onEnsureDebugId(java.lang.String baseID)
Deprecated.
Affected Elements:
-splitter = the container containing the splitter element.
|
(package private) abstract void |
onSplitterResize(int x,
int y)
Deprecated.
Called on each mouse drag event as the user is dragging the splitter.
|
(package private) abstract void |
onSplitterResizeStarted(int x,
int y)
Deprecated.
Called when the user starts dragging the splitter.
|
(package private) static Element |
preventBoxStyles(Element elem)
Deprecated.
Adds zero or none CSS values for padding, margin and border to prevent
stylesheet overrides.
|
boolean |
remove(Widget widget)
Deprecated.
Removes a child widget.
|
(package private) static void |
setBottom(Element elem,
java.lang.String size)
Deprecated.
Convenience method to set bottom offset of an element.
|
(package private) static void |
setClassname(Element elem,
java.lang.String className)
Deprecated.
Sets the elements css class name.
|
(package private) static void |
setHeight(Element elem,
java.lang.String height)
Deprecated.
Convenience method to set the height of an element.
|
(package private) static void |
setLeft(Element elem,
java.lang.String left)
Deprecated.
Convenience method to set the left offset of an element.
|
(package private) static void |
setRight(Element elem,
java.lang.String right)
Deprecated.
Convenience method to set the right offset of an element.
|
abstract void |
setSplitPosition(java.lang.String size)
Deprecated.
Moves the position of the splitter.
|
(package private) static void |
setTop(Element elem,
java.lang.String top)
Deprecated.
Convenience method to set the top offset of an element.
|
protected void |
setWidget(int index,
Widget w)
Deprecated.
Sets one of the contained widgets.
|
(package private) static void |
setWidth(Element elem,
java.lang.String width)
Deprecated.
Convenience method to set the width of an element.
|
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, replaceElement, setLayoutData, setParent, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
SplitPanel(Element mainElem, Element splitElem, Element headElem, Element tailElem)
mainElem
- the root element for the split panelsplitElem
- the element that acts as the splitterheadElem
- the element to contain the top or left most widgettailElem
- the element to contain the bottom or right most widgetstatic void addAbsolutePositoning(Element elem)
elem
- the elementstatic final void addClipping(Element elem)
elem
- the elementstatic final void addScrolling(Element elem)
elem
- the elementstatic final void expandToFitParentUsingCssOffsets(Element elem)
elem
- the elementstatic final void expandToFitParentUsingPercentages(Element elem)
elem
- the elementstatic final int getOffsetHeight(Element elem)
elem
- the elementstatic final int getOffsetWidth(Element elem)
elem
- the elementstatic final Element preventBoxStyles(Element elem)
elem
- the elementstatic void setBottom(Element elem, java.lang.String size)
elem
- the elementsize
- a CSS length value for bottomstatic final void setClassname(Element elem, java.lang.String className)
elem
- the elementclassName
- the class namestatic final void setHeight(Element elem, java.lang.String height)
elem
- the elementheight
- a CSS length value for the heightstatic final void setLeft(Element elem, java.lang.String left)
elem
- the elementleft
- a CSS length value for leftstatic final void setRight(Element elem, java.lang.String right)
elem
- the elementright
- a CSS length value for rightstatic final void setTop(Element elem, java.lang.String top)
elem
- the elementtop
- a CSS length value for topstatic final void setWidth(Element elem, java.lang.String width)
elem
- the elementwidth
- a CSS length value for the widthpublic void add(Widget w)
Panel
How to Override this Method
There are several important things that must take place in the correct order to properly add or insert a Widget to a Panel. Not all of these steps will be relevant to every Panel, but all of the steps must be considered.
ComplexPanel.adjustIndex(Widget, int)
.Widget.removeFromParent()
on the
Widget.WidgetCollection
at the appropriate index.Panel.adopt(Widget)
to finalize the add as the
very last step.add
in interface HasWidgets
add
in class Panel
w
- the widget to be addedHasWidgets.add(Widget)
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 removedtrue
if the child was presentpublic abstract void setSplitPosition(java.lang.String size)
size
- the new size of the left region in CSS units (e.g. "10px",
"1em")protected 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 void onEnsureDebugId(java.lang.String baseID)
onEnsureDebugId
in class UIObject
baseID
- the base ID used by the main elementUIObject.onEnsureDebugId(String)
protected final void setWidget(int index, Widget w)
index
- the index, only 0 and 1 are validw
- the widgetabstract void onSplitterResize(int x, int y)
x
- the x coordinate of the mouse relative to the panel's extenty
- the y coordinate of the mosue relative to the panel's extentabstract void onSplitterResizeStarted(int x, int y)
x
- the x coordinate of the mouse relative to the panel's extenty
- the y coordinate of the mouse relative to the panel's extent