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

Class SplitPanel

source code

   object --+                
            |                
      Applier --+            
                |            
UIObject.UIObject --+        
                    |        
        Widget.Widget --+    
                        |    
              Panel.Panel --+
                            |
                           SplitPanel

Abstract base class for {@link HorizontalSplitPanel} and {@link VerticalSplitPanel}.

Instance Methods [hide private]
 
__init__(self, mainElem, splitElem, headElem, tailElem, **kwargs)
Initializes the split panel.
source code
 
setThumbImage(self, ti) source code
 
getThumbImageHTML(self) source code
 
addAbsolutePositoning(self, elem)
Sets an elements positioning to absolute.
source code
 
addClipping(self, elem)
Adds clipping to an element.
source code
 
addScrolling(self, elem)
Adds as-needed scrolling to an element.
source code
 
expandToFitParentUsingCssOffsets(self, elem)
Sizes and element to consume the full area of its parent using the CSS properties left, right, top, and bottom.
source code
 
expandToFitParentUsingPercentages(self, elem)
Sizes an element to consume the full areas of its parent using 100% width and height.
source code
 
preventBoxStyles(self, elem)
Adds zero or none CSS values for padding, margin and border to prevent stylesheet overrides.
source code
 
setBottom(self, elem, size)
Convenience method to set bottom offset of an element.
source code
 
setElemHeight(self, elem, height)
Convenience method to set the height of an element.
source code
 
setLeft(self, elem, left)
Convenience method to set the left offset of an element.
source code
 
setRight(self, elem, right)
Convenience method to set the right offset of an element.
source code
 
setTop(self, elem, top)
Convenience method to set the top offset of an element.
source code
 
setElemWidth(self, elem, width)
Convenience method to set the width of an element.
source code
 
add(self, w) source code
 
isResizing(self)
Indicates whether the split panel is being resized.
source code
 
__iter__(self) source code
 
onBrowserEvent(self, event) source code
 
remove(self, widget) source code
 
setSplitPosition(self, size)
Moves the position of the splitter.
source code
 
getWidgetElement(self, index)
Gets the content element for the given index.
source code
 
getSplitElement(self)
Gets the element that is acting as the splitter.
source code
 
getWidget(self, index)
Gets one of the contained widgets.
source code
 
setWidget(self, index, w)
Sets one of the contained widgets.
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
 
startResizingFrom(self, x, y) source code
 
stopResizing(self) source code

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

Inherited from Widget.Widget: getID, getLayoutData, getParent, isAttached, onAttach, onDetach, onLoad, 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, mainElem, splitElem, headElem, tailElem, **kwargs)
(Constructor)

source code 

Initializes the split panel. @param mainElem the root element for the split panel @param splitElem the element that acts as the splitter @param headElem the element to contain the top or left most widget @param tailElem the element to contain the bottom or right most widget

Overrides: object.__init__

expandToFitParentUsingCssOffsets(self, elem)

source code 

Sizes and element to consume the full area of its parent using the CSS properties left, right, top, and bottom. This method is used for all browsers except IE6/7.

expandToFitParentUsingPercentages(self, elem)

source code 

Sizes an element to consume the full areas of its parent using 100% width and height. This method is used on IE6/7 where CSS offsets don't work reliably.

preventBoxStyles(self, elem)

source code 

Adds zero or none CSS values for padding, margin and border to prevent stylesheet overrides. Returns the element for convenience to support builder pattern.

add(self, w)

source code 
Overrides: Panel.Panel.add

isResizing(self)

source code 
Indicates whether the split panel is being resized.

@return <code>True</code> if the user is dragging the splitter,
        <code>False</code> otherwise

__iter__(self)

source code 
Overrides: Panel.Panel.__iter__

onBrowserEvent(self, event)

source code 
Overrides: Widget.Widget.onBrowserEvent

remove(self, widget)

source code 
Overrides: Panel.Panel.remove

setSplitPosition(self, size)

source code 

Moves the position of the splitter. @param size the new size of the left region in CSS units (e.g. "10px", "1em")

getWidgetElement(self, index)

source code 

Gets the content element for the given index. @param index the index of the element, only 0 and 1 are valid. @return the element

getSplitElement(self)

source code 

Gets the element that is acting as the splitter. @return the element

getWidget(self, index)

source code 

Gets one of the contained widgets. @param index the index of the widget, only 0 and 1 are valid. @return the widget

setWidget(self, index, w)

source code 

Sets one of the contained widgets. @param index the index, only 0 and 1 are valid @param w the widget

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

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