Home | Trees | Indices | Help |
|
---|
|
1 # Copyright (C) 2010 Jim Washington 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 16 from pyjamas import Factory 17 from pyjamas import DOM 18 from pyjamas.dnd.DNDHelper import dndHelper 19 from pyjamas.ui.Widget import Widget 20 from pyjamas.ui.DropHandler import DropHandler 21 import pyjd 22 28 2936 37 42 4332 if (not hasattr(self, 'attached')) or kw: 33 Widget.__init__(self, **kw) 34 DropHandler.__init__(self) 35 self.addDropListener(self)45 global DropWidget 46 if is_native is None: 47 html5_dnd = hasattr(DOM.createElement('span'), 'draggable') 48 else: 49 html5_dnd = is_native 50 if html5_dnd: 51 DropWidget = Html5DropWidget 52 else: 53 DropWidget = EmulatedDropWidget54 55 if pyjd.is_desktop: 56 init(pyjd.native_dnd) 57 else: 58 init(None) 59 60 Factory.registerClass('pyjamas.ui.DropWidget', 'DropWidget', DropWidget) 61
Home | Trees | Indices | Help |
|
---|
http://epydoc.sourceforge.net |