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

Source Code for Module pyjamas.ui.InlineLabel

 1  # Copyright 2010 Daniel Popowich <danielpopowich@gmail.com> 
 2  # 
 3  # Licensed under the Apache License, Version 2.0 (the "License"); 
 4  # you may not use this file except in compliance with the License. 
 5  # You may obtain a copy of the License at 
 6  # 
 7  #     http://www.apache.org/licenses/LICENSE-2.0 
 8  # 
 9  # Unless required by applicable law or agreed to in writing, software 
10  # distributed under the License is distributed on an "AS IS" BASIS, 
11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
12  # See the License for the specific language governing permissions and 
13  # limitations under the License. 
14   
15  from pyjamas import DOM 
16  from pyjamas import Factory 
17  from pyjamas.ui.Label import Label 
18   
19 -class InlineLabel(Label):
20 '''A Label, but using <span> instead of <div>''' 21
22 - def __init__(self, text=None, wordWrap=True, **kwargs):
23 kwargs['StyleName'] = kwargs.get('StyleName', "gwt-InlineLabel") 24 kwargs['Element'] = DOM.createSpan() 25 Label.__init__(self, text, wordWrap, **kwargs)
26 27 Factory.registerClass('pyjamas.ui.InlineLabel', 'InlineLabel', InlineLabel) 28