本文整理汇总了Python中pyjamas.ui.Label.Label.addMouseListener方法的典型用法代码示例。如果您正苦于以下问题:Python Label.addMouseListener方法的具体用法?Python Label.addMouseListener怎么用?Python Label.addMouseListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.ui.Label.Label
的用法示例。
在下文中一共展示了Label.addMouseListener方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pyjamas.ui.Label import Label [as 别名]
# 或者: from pyjamas.ui.Label.Label import addMouseListener [as 别名]
def __init__(self,parent):
AbsolutePanel.__init__(self)
ftable = FlexTable()
ftable.setWidget(0, 0, Label("First Name", wordWrap=False))
ftableFormatter = ftable.getFlexCellFormatter()
self.firstInput = TextBox()
self.firstInput.addChangeListener(self.checkValid)
self.firstInput.addKeyboardListener(self)
ftable.setWidget(0, 1, self.firstInput)
ftable.setWidget(1, 0, Label("Last Name", wordWrap=False))
self.lastInput = TextBox()
self.lastInput.addChangeListener(self.checkValid)
self.lastInput.addKeyboardListener(self)
ftable.setWidget(1, 1, self.lastInput)
ftable.setWidget(2, 0, Label("Email", wordWrap=False))
self.emailInput = TextBox()
self.emailInput.addChangeListener(self.checkValid)
self.emailInput.addKeyboardListener(self)
ftable.setWidget(2, 1, self.emailInput)
w = Label("* Username", wordWrap=False)
w.addMouseListener(TooltipListener("Required, not changable"))
ftable.setWidget(3, 0, w)
self.usernameInput = TextBox()
self.usernameInput.addChangeListener(self.checkValid)
self.usernameInput.addKeyboardListener(self)
ftable.setWidget(3, 1, self.usernameInput)
w = Label("* Password", wordWrap=False)
w.addMouseListener(TooltipListener("Required"))
ftable.setWidget(4, 0, w)
self.passwordInput = PasswordTextBox()
self.passwordInput.addChangeListener(self.checkValid)
self.passwordInput.addKeyboardListener(self)
ftable.setWidget(4, 1, self.passwordInput)
w = Label("* Confirm", wordWrap=False)
w.addMouseListener(TooltipListener("Required"))
ftable.setWidget(5, 0, w)
self.confirmInput = PasswordTextBox()
self.confirmInput.addChangeListener(self.checkValid)
self.confirmInput.addKeyboardListener(self)
ftable.setWidget(5, 1, self.confirmInput)
w = Label("* Department", wordWrap=False)
w.addMouseListener(TooltipListener("Required"))
ftable.setWidget(6, 0, w)
self.departmentCombo = ListBox()
self.departmentCombo.addChangeListener(self.checkValid)
self.departmentCombo.addKeyboardListener(self)
ftable.setWidget(6, 1, self.departmentCombo)
hpanel = HorizontalPanel()
self.addBtn = Button("Add User")
self.addBtn.setEnabled(False)
hpanel.add(self.addBtn)
self.cancelBtn = Button("Cancel")
hpanel.add(self.cancelBtn)
ftable.setWidget(7, 0, hpanel)
ftableFormatter.setColSpan(7, 0, 2)
self.add(ftable)
self.clearForm()
return