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

Source Code for Module pyjamas.ui.HorizontalSplitPanel

 1  """ 
 2  Horizontal Split Panel: Left and Right layouts with a movable splitter. 
 3   
 4  Copyright 2008 Google Inc. 
 5  Copyright 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> 
 6  Copyright 2010 Rich Newpol <rich.newpol@gmail.com> 
 7   
 8  Licensed under the Apache License, Version 2.0 (the "License") you may not 
 9  use this file except in compliance with the License. You may obtain a copy 
10  of the License at 
11   
12  http:#www.apache.org/licenses/LICENSE-2.0 
13   
14  Unless required by applicable law or agreed to in writing, software 
15  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
16  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
17  License for the specific language governing permissions and limitations 
18  under the License. 
19   
20  """ 
21  from pyjamas.ui.SplitPanel import SplitPanel 
22  from pyjamas import Factory 
23   
24   
25 -class HorizontalSplitPanel(SplitPanel):
26 - def __init__(self, **kwargs):
27 # call base constructor 28 SplitPanel.__init__(self, vertical=False, **kwargs)
29
30 - def setLeftWidget(self, leftWidget):
31 self.setWidget(0, leftWidget)
32
33 - def getLeftWidget(self):
34 return self.getWidget(0)
35
36 - def setRightWidget(self, rightWidget):
37 self.setWidget(1, rightWidget)
38
39 - def getRightWidget(self):
40 return self.getWidget(1)
41 42 Factory.registerClass('pyjamas.ui.HorizontalSplitPanel', 43 'HorizontalSplitPanel', 44 HorizontalSplitPanel) 45