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

Source Code for Module library.pyjamas.ui.VerticalSplitPanel

 1  """ 
 2  Vertical Split Panel: Top and Bottom layouts with a movable splitter. 
 3   
 4  Copyright 2008 Google Inc. 
 5  Copyright (C) 2008, 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 self 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   
22  from pyjamas.ui.SplitPanel import SplitPanel 
23  from pyjamas import Factory 
24   
25   
26  # provides the VerticalSplitPanel 
27 -class VerticalSplitPanel(SplitPanel):
28 - def __init__(self, **kwargs):
29 # call base constructor 30 SplitPanel.__init__(self, vertical=True, **kwargs)
31
32 - def setTopWidget(self, topWidget):
33 self.setWidget(0, topWidget)
34
35 - def getTopWidget(self):
36 return self.getWidget(0)
37
38 - def setBottomWidget(self, botWidget):
39 self.setWidget(1, botWidget)
40
41 - def getBottomWidget(self):
42 return self.getWidget(1)
43 44 Factory.registerClass('pyjamas.ui.VerticalSplitPanel', 45 'VerticalSplitPanel', 46 VerticalSplitPanel) 47