当前位置: 首页>>代码示例>>Python>>正文


Python AbsolutePanel.add方法代码示例

本文整理汇总了Python中pyjamas.ui.AbsolutePanel.AbsolutePanel.add方法的典型用法代码示例。如果您正苦于以下问题:Python AbsolutePanel.add方法的具体用法?Python AbsolutePanel.add怎么用?Python AbsolutePanel.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyjamas.ui.AbsolutePanel.AbsolutePanel的用法示例。


在下文中一共展示了AbsolutePanel.add方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from pyjamas.ui.AbsolutePanel import AbsolutePanel [as 别名]
# 或者: from pyjamas.ui.AbsolutePanel.AbsolutePanel import add [as 别名]
    def __init__(self, **kwargs):
        """ setMatchPattern - defaults to '' to match everything
            match pattern examples: '^[0-9]*$' is for digits only
                                    '^[0-9,A-Z]*$' is for digits and uppercase
            setMaxLength
            setText
OB        """

        kwargs['MatchPattern'] = kwargs.pop('MatchPattern', '')
        cs = kwargs.pop('CursorStyle', "inputbox-cursor")
        gs = kwargs.pop('StyleName', 'gwt-inputbox')

        ap = AbsolutePanel(StyleName="inputbox")
        self.tp = Grid(StyleName=gs, Width="100%", Height="100%",
                       CellPadding=0, CellSpacing=0)
        self.cursor = HTML(StyleName=cs)
        ap.add(self.tp)
        ap.add(self.cursor, 0, 0)
        self.cf = self.tp.getCellFormatter()

        FocusPanel.__init__(self, Widget=ap, **kwargs)

        self.addTableListener(self)
        self.addKeyboardListener(self)
        self.addFocusListener(self)

        self.word_selected_pos = 0
        self.ctimer = Timer(notify=self.cursorFlash)
        self.focusset = False
        self.cstate = False
        self._keypressListeners = []
开发者ID:,项目名称:,代码行数:33,代码来源:

示例2: __init__

# 需要导入模块: from pyjamas.ui.AbsolutePanel import AbsolutePanel [as 别名]
# 或者: from pyjamas.ui.AbsolutePanel.AbsolutePanel import add [as 别名]
    def __init__(self):
        SimplePanel.__init__(self)

        panel = AbsolutePanel(Width="100%", Height="100px")

        panel.add(self.makeBox("Child 1"), 20, 10)
        panel.add(self.makeBox("Child 2"), 30, 30)

        self.add(panel)
开发者ID:Afey,项目名称:pyjs,代码行数:11,代码来源:absolutePanel.py

示例3: __init__

# 需要导入模块: from pyjamas.ui.AbsolutePanel import AbsolutePanel [as 别名]
# 或者: from pyjamas.ui.AbsolutePanel.AbsolutePanel import add [as 别名]
    def __init__(self):
        SimplePanel.__init__(self)

        panel = AbsolutePanel()

        panel.add(self.makeBox("Child 1"), 20, 10)
        panel.add(self.makeBox("Child 2"), 30, 30)

        panel.setWidth("100%")
        panel.setHeight("100px")

        self.add(panel)
开发者ID:FreakTheMighty,项目名称:pyjamas,代码行数:14,代码来源:absolutePanel.py

示例4: AppFrame

# 需要导入模块: from pyjamas.ui.AbsolutePanel import AbsolutePanel [as 别名]
# 或者: from pyjamas.ui.AbsolutePanel.AbsolutePanel import add [as 别名]
class AppFrame(object):

    edit_panel = None
    home_panel = None
    write_panel = None

    def __init__(self):
        self.panel = AbsolutePanel()
        self.edit_panel = EditPanel(self)
        self.home_panel = HomePanel(self)
        self.write_panel = WritePanel(self)
        self.panel.add(self.edit_panel)
        self.panel.add(self.home_panel)
        self.panel.add(self.write_panel)
        RootPanel().add(self.panel)
开发者ID:Afey,项目名称:pyjs,代码行数:17,代码来源:components.py

示例5: findMovie

# 需要导入模块: from pyjamas.ui.AbsolutePanel import AbsolutePanel [as 别名]
# 或者: from pyjamas.ui.AbsolutePanel.AbsolutePanel import add [as 别名]
		findMovie(result['movie_id'])
		findRating(result['movie_id'])
		mainpage.mid = result['movie_id']
		

class Site:
	def __init__(self):
		self.mid = None
		HTTPRequest().asyncGet("http://student02.cse.nd.edu:40001/recommendations/156", getRec(self))


if __name__=='__main__':
	pyjd.setup("public/primer.html")
	mainpage = Site()
	l = Label("Enter movie ID:")
	movie = Label("Movie Title Displayed Here if Found")
	movieRating = Label("Movie Rating Displayed Here if Found")
	poster = Image()
	b1 = Button("Up",upvote)
	b2 = Button("Down", downvote)
	absolute = AbsolutePanel()
	absolute.add(poster,50,25)
	absolute.add(b1,0,100)
	absolute.add(b2,250,100)
	absolute.add(movie,50,0)
	absolute.add(movieRating,50,315)
	absolute.setWidth("100%")
        absolute.setHeight("100%")
	RootPanel().add(absolute)
	pyjd.run()
开发者ID:RyanAMoran,项目名称:Python-Movie-Recommender,代码行数:32,代码来源:movie.py

示例6: AbsolutePanel

# 需要导入模块: from pyjamas.ui.AbsolutePanel import AbsolutePanel [as 别名]
# 或者: from pyjamas.ui.AbsolutePanel.AbsolutePanel import add [as 别名]
     AbsolutePanel container = AbsolutePanel()
     DOM.setStyleAttribute(container.getElement(), "overflow", "visible")
     
     container.setPixelSize(context.draggable.getOffsetWidth(),
     context.draggable.getOffsetHeight())
     context.boundaryPanel.add(container, currentDraggableLocation.getLeft(),
     currentDraggableLocation.getTop())
     
     int draggableAbsoluteLeft = context.draggable.getAbsoluteLeft()
     int draggableAbsoluteTop = context.draggable.getAbsoluteTop()
     for Iterator iterator = context.selectedWidgets.iterator(); iterator.hasNext();:
         Widget widget = (Widget) iterator.next()
         if widget != context.draggable:
             int relativeX = widget.getAbsoluteLeft() - draggableAbsoluteLeft
             int relativeY = widget.getAbsoluteTop() - draggableAbsoluteTop
             container.add(widget, relativeX, relativeY)
         
     
     container.add(context.draggable, 0, 0)
     movablePanel = container
 
 movablePanel.addStyleName(PRIVATE_CSS_MOVABLE_PANEL)
 
 # one time calculation of boundary panel location for efficiency during dragging
 Location widgetLocation = WidgetLocation(context.boundaryPanel, None)
 boundaryOffsetX = widgetLocation.getLeft()
 + DOMUtil.getBorderLeft(context.boundaryPanel.getElement())
 boundaryOffsetY = widgetLocation.getTop()
 + DOMUtil.getBorderTop(context.boundaryPanel.getElement())
 
 dropTargetClientWidth = DOMUtil.getClientWidth(boundaryPanel.getElement())
开发者ID:jaredly,项目名称:pyjamas,代码行数:33,代码来源:PickupDragController.py


注:本文中的pyjamas.ui.AbsolutePanel.AbsolutePanel.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。