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

Source Code for Module library.pyjamas.ui.InlineHTML

 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.HTML import HTML 
18   
19 -class InlineHTML(HTML):
20 '''An HTML, but using <span> instead of <div>''' 21
22 - def __init__(self, html=None, wordWrap=True, **kwargs):
23 kwargs['StyleName'] = kwargs.get('StyleName', "gwt-InlineHTML") 24 kwargs['Element'] = DOM.createSpan() 25 HTML.__init__(self, html, wordWrap, **kwargs)
26 27 Factory.registerClass('pyjamas.ui.InlineHTML', 'InlineHTML', InlineHTML) 28