Package pyjamas :: Package ui :: Module HorizontalSplitPanel :: Class HorizontalSplitPanel
[hide private]
[frames] | no frames]

Class HorizontalSplitPanel

source code

   object --+                    
            |                    
      Applier --+                
                |                
UIObject.UIObject --+            
                    |            
        Widget.Widget --+        
                        |        
              Panel.Panel --+    
                            |    
        SplitPanel.SplitPanel --+
                                |
                               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 <code>HorizontalSplitPanel</code> will be automatically decorated with scrollbars when necessary.

Default layout behaviour of HorizontalSplitPanels is to 100% fill its parent vertically and horizontally [this is NOT normal!]

Instance Methods [hide private]
 
__init__(self, **kwargs)
Creates an empty horizontal split panel.
source code
 
add(self, w)
* Adds a widget to a pane in the HorizontalSplitPanel.
source code
 
getEndOfLineWidget(self)
* Gets the widget in the pane that is at the end of the line * direction for the layout.
source code
 
getLeftWidget(self)
* Gets the widget in the left side of the panel.
source code
 
getRightWidget(self)
* Gets the widget in the right side of the panel.
source code
 
getStartOfLineWidget(self)
* Gets the widget in the pane that is at the start of the line * direction for the layout.
source code
 
setEndOfLineWidget(self, w)
* Sets the widget in the pane that is at the end of the line direction * for the layout.
source code
 
setLeftWidget(self, w)
* Sets the widget in the left side of the panel.
source code
 
setRightWidget(self, w)
* Sets the widget in the right side of the panel.
source code
 
setSplitPosition(self, pos)
* Moves the position of the splitter.
source code
 
setStartOfLineWidget(self, w)
* Sets the widget in the pane that is at the start of the line direction * for the layout.
source code
 
onLoad(self) source code
 
execute(self) source code
 
onUnload(self) source code
 
onSplitterResize(self, x, y)
Called on each mouse drag event as the user is dragging the splitter.
source code
 
onSplitterResizeStarted(self, x, y)
Called when the user starts dragging the splitter.
source code
 
buildDOM(self) source code
 
getEndOfLinePos(self) source code
 
getStartOfLinePos(self) source code

Inherited from SplitPanel.SplitPanel: __iter__, addAbsolutePositoning, addClipping, addScrolling, expandToFitParentUsingCssOffsets, expandToFitParentUsingPercentages, getSplitElement, getThumbImageHTML, getWidget, getWidgetElement, isResizing, onBrowserEvent, preventBoxStyles, remove, setBottom, setElemHeight, setElemWidth, setLeft, setRight, setThumbImage, setTop, setWidget, startResizingFrom, stopResizing

Inherited from Panel.Panel: adopt, clear, disown, doAttachChildren, doDetachChildren

Inherited from Widget.Widget: getID, getLayoutData, getParent, isAttached, onAttach, onDetach, removeFromParent, setContextMenu, setID, setLayoutData, setParent

Inherited from UIObject.UIObject: addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getHeight, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, getWidth, isVisible, removeStyleDependentName, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setTitle, setVisible, setWidth, setzIndex, sinkEvents, unsinkEvents

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kwargs)
(Constructor)

source code 

Creates an empty horizontal split panel.

Overrides: object.__init__

add(self, w)

source code 

* Adds a widget to a pane in the HorizontalSplitPanel. The method * will first attempt to add the widget to the left pane. If a * widget is already in that position, it will attempt to add the * widget to the right pane. If a widget is already in that position, * an exception will be thrown, as a HorizontalSplitPanel can * contain at most two widgets. * * Note that this method is bidi-sensitive. In an RTL environment, * this method will first attempt to add the widget to the right pane, * and if a widget is already in that position, it will attempt to add * the widget to the left pane. * * @param w the widget to be added * @throws IllegalStateException

Overrides: Panel.Panel.add

getEndOfLineWidget(self)

source code 

* Gets the widget in the pane that is at the end of the line * direction for the layout. That is, in an RTL layout, gets * the widget in the left pane, and in an LTR layout, gets * the widget in the right pane. * * @return the widget, <code>null</code> if there is not one.

getLeftWidget(self)

source code 

* Gets the widget in the left side of the panel. * * @return the widget, <code>null</code> if there is not one.

getRightWidget(self)

source code 

* Gets the widget in the right side of the panel. * * @return the widget, <code>null</code> if there is not one.

getStartOfLineWidget(self)

source code 

* Gets the widget in the pane that is at the start of the line * direction for the layout. That is, in an RTL environment, gets * the widget in the right pane, and in an LTR environment, gets * the widget in the left pane. * * @return the widget, <code>null</code> if there is not one.

setEndOfLineWidget(self, w)

source code 

* Sets the widget in the pane that is at the end of the line direction * for the layout. That is, in an RTL layout, sets the widget in * the left pane, and in and RTL layout, sets the widget in the * right pane. * * @param w the widget

setLeftWidget(self, w)

source code 

* Sets the widget in the left side of the panel. * * @param w the widget

setRightWidget(self, w)

source code 

* Sets the widget in the right side of the panel. * * @param w the widget

setSplitPosition(self, pos)

source code 

* Moves the position of the splitter. * * This method is not bidi-sensitive. The size specified is always * the size of the left region, regardless of directionality. * * @param pos the new size of the left region in CSS units (e.g. "10px", * "1em")

Overrides: SplitPanel.SplitPanel.setSplitPosition

setStartOfLineWidget(self, w)

source code 

* Sets the widget in the pane that is at the start of the line direction * for the layout. That is, in an RTL layout, sets the widget in * the right pane, and in and RTL layout, sets the widget in the * left pane. * * @param w the widget

onLoad(self)

source code 
Overrides: Widget.Widget.onLoad

onSplitterResize(self, x, y)

source code 

Called on each mouse drag event as the user is dragging the splitter. @param x the x coord of the mouse relative to the panel's extent @param y the y coord of the mosue relative to the panel's extent

Overrides: SplitPanel.SplitPanel.onSplitterResize
(inherited documentation)

onSplitterResizeStarted(self, x, y)

source code 

Called when the user starts dragging the splitter. @param x the x coord of the mouse relative to the panel's extent @param y the y coord of the mouse relative to the panel's extent

Overrides: SplitPanel.SplitPanel.onSplitterResizeStarted
(inherited documentation)