def __init__(self): Composite.__init__(self) self.signOutLink = HTML("<a href='javascript:;'>Sign Out</a>") self.aboutLink = HTML("<a href='javascript:;'>About</a>") outer = HorizontalPanel() inner = VerticalPanel() outer.setHorizontalAlignment(HasAlignment.ALIGN_RIGHT) inner.setHorizontalAlignment(HasAlignment.ALIGN_RIGHT) links = HorizontalPanel() links.setSpacing(4) links.add(self.signOutLink) links.add(self.aboutLink) outer.add(inner) inner.add(HTML("<b>Welcome back, [email protected]</b>")) inner.add(links) self.signOutLink.addClickListener(self) self.aboutLink.addClickListener(self) self.initWidget(outer) inner.setStyleName("mail-TopPanel") links.setStyleName("mail-TopPanelLinks")
def __init__(self, calendar): Composite.__init__(self) self.calendar = calendar self.dayCheckBoxListener = DayCheckBoxListener(calendar) self.outer = VerticalPanel() self.initWidget(self.outer) self.setStyleName("DynaTable-DayFilterWidget") self.outer.add(DayCheckBox(self, "Sunday", 0)) self.outer.add(DayCheckBox(self, "Monday", 1)) self.outer.add(DayCheckBox(self, "Tuesday", 2)) self.outer.add(DayCheckBox(self, "Wednesday", 3)) self.outer.add(DayCheckBox(self, "Thursday", 4)) self.outer.add(DayCheckBox(self, "Friday", 5)) self.outer.add(DayCheckBox(self, "Saturday", 6)) self.buttonAll = Button("All", self) self.buttonNone = Button("None", self) hp = HorizontalPanel() hp.setHorizontalAlignment(HasAlignment.ALIGN_CENTER) hp.add(self.buttonAll) hp.add(self.buttonNone) self.outer.add(hp) self.outer.setCellVerticalAlignment(hp, HasAlignment.ALIGN_BOTTOM) self.outer.setCellHorizontalAlignment(hp, HasAlignment.ALIGN_CENTER)
def __init__(self, owner): Composite.__init__(self) self.owner = owner self.bar = DockPanel() self.gotoFirst = Button("<<", self) self.gotoNext = Button(">", self) self.gotoPrev = Button("<", self) self.status = HTML() self.initWidget(self.bar) self.bar.setStyleName("navbar") self.status.setStyleName("status") buttons = HorizontalPanel() buttons.add(self.gotoFirst) buttons.add(self.gotoPrev) buttons.add(self.gotoNext) self.bar.add(buttons, DockPanel.EAST) self.bar.setCellHorizontalAlignment(buttons, HasAlignment.ALIGN_RIGHT) self.bar.add(self.status, DockPanel.CENTER) self.bar.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE) self.bar.setCellHorizontalAlignment(self.status, HasAlignment.ALIGN_RIGHT) self.bar.setCellVerticalAlignment(self.status, HasAlignment.ALIGN_MIDDLE) self.bar.setCellWidth(self.status, "100%") self.gotoPrev.setEnabled(False) self.gotoFirst.setEnabled(False)
def __init__(self): Composite.__init__(self) panel = VerticalPanel() headerPanel = VerticalPanel() self.subject = HTML() self.sender = HTML() self.recipient = HTML() self.body = HTML() self.scroller = ScrollPanel(self.body) self.body.setWordWrap(True) headerPanel.add(self.subject) headerPanel.add(self.sender) headerPanel.add(self.recipient) headerPanel.setWidth("100%") innerPanel = DockPanel() innerPanel.add(headerPanel, DockPanel.NORTH) innerPanel.add(self.scroller, DockPanel.CENTER) innerPanel.setCellHeight(self.scroller, "100%") panel.add(innerPanel) innerPanel.setSize("100%", "100%") self.scroller.setSize("100%", "100%") self.initWidget(panel) self.setStyleName("mail-Detail") headerPanel.setStyleName("mail-DetailHeader") innerPanel.setStyleName("mail-DetailInner") self.subject.setStyleName("mail-DetailSubject") self.sender.setStyleName("mail-DetailSender") self.recipient.setStyleName("mail-DetailRecipient") self.body.setStyleName("mail-DetailBody")
def __init__(self, calendar): Composite.__init__(self) self.calendar = calendar self.dayCheckBoxListener = DayCheckBoxListener(calendar) self.outer = VerticalPanel() self.setWidget(self.outer) self.setStyleName("DynaTable-DayFilterWidget") self.outer.add(DayCheckBox(self, "Sunday", 0)) self.outer.add(DayCheckBox(self, "Monday", 1)) self.outer.add(DayCheckBox(self, "Tuesday", 2)) self.outer.add(DayCheckBox(self, "Wednesday", 3)) self.outer.add(DayCheckBox(self, "Thursday", 4)) self.outer.add(DayCheckBox(self, "Friday", 5)) self.outer.add(DayCheckBox(self, "Saturday", 6)) self.buttonAll = Button("All", self) self.buttonNone = Button("None", self) hp = HorizontalPanel() hp.setHorizontalAlignment(HasAlignment.ALIGN_CENTER) hp.add(self.buttonAll) hp.add(self.buttonNone) self.outer.add(hp) self.outer.setCellVerticalAlignment(hp, HasAlignment.ALIGN_BOTTOM) self.outer.setCellHorizontalAlignment(hp, HasAlignment.ALIGN_CENTER)
def __init__(self): Composite.__init__(self) self.vp_list=VerticalPanel() self.sinks=[] self.selectedSink=-1 self.initWidget(self.vp_list) self.setStyleName("ks-List")
def __init__(self, visibleRows): Composite.__init__(self) columns = ["Name", "Description", "Schedule"] styles = ["name", "desc", "sched"] self.calProvider = CalendarProvider(self) self.daysFilter = [True, True, True, True, True, True, True] self.pendingRefresh = False self.dynaTable = DynaTableWidget(self.calProvider, columns, styles, visibleRows) self.setWidget(self.dynaTable)
def __init__(self): Composite.__init__(self) panel = VerticalPanel() panel.add(CheckBox("Get groceries")) panel.add(CheckBox("Walk the dog")) panel.add(CheckBox("Start Web 2.0 company")) panel.add(CheckBox("Write cool app in GWT")) panel.add(CheckBox("Get funding")) panel.add(CheckBox("Take a vacation")) self.initWidget(panel) self.setStyleName("mail-Tasks")
def __init__(self): Composite.__init__(self) self.tree = Tree() root = TreeItem(self.imageItemHTML("home.gif", "*****@*****.**")) self.tree.addItem(root) inboxItem = self.addImageItem(root, "Inbox") self.addImageItem(root, "Drafts") self.addImageItem(root, "Templates") self.addImageItem(root, "Sent") self.addImageItem(root, "Trash") root.setState(True) self.initWidget(self.tree)
def __init__(self, provider, columns, columnStyles, rowCount): Composite.__init__(self) self.acceptor = RowDataAcceptorImpl(self) self.outer = DockPanel() self.startRow = 0 self.grid = Grid() self.navbar = NavBar(self) self.provider = provider self.initWidget(self.outer) self.grid.setStyleName("table") self.outer.add(self.navbar, DockPanel.NORTH) self.outer.add(self.grid, DockPanel.CENTER) self.initTable(columns, columnStyles, rowCount) self.setStyleName("DynaTable-DynaTableWidget")
def __init__(self, provider, columns, columnStyles, rowCount): Composite.__init__(self) self.acceptor = RowDataAcceptorImpl(self) self.outer = DockPanel() self.startRow = 0 self.grid = Grid() self.navbar = NavBar(self) self.provider = provider self.setWidget(self.outer) self.grid.setStyleName("table") self.outer.add(self.navbar, DockPanel.NORTH) self.outer.add(self.grid, DockPanel.CENTER) self.initTable(columns, columnStyles, rowCount) self.setStyleName("DynaTable-DynaTableWidget")
def __init__(self): Composite.__init__(self) self.contacts = [] self.contacts.append(Contact("Benoit Mandelbrot", "*****@*****.**")) self.contacts.append(Contact("Albert Einstein", "*****@*****.**")) self.contacts.append(Contact("Rene Descartes", "*****@*****.**")) self.contacts.append(Contact("Bob Saget", "*****@*****.**")) self.contacts.append(Contact("Ludwig von Beethoven", "*****@*****.**")) self.contacts.append(Contact("Richard Feynman", "*****@*****.**")) self.contacts.append(Contact("Alan Turing", "*****@*****.**")) self.contacts.append(Contact("John von Neumann", "*****@*****.**")) self.panel = VerticalPanel() # Add all the contacts to the list. i = 0 while (i < len(self.contacts)): self.addContact(self.contacts[i]) i = i + 1 self.initWidget(self.panel) self.setStyleName("mail-Contacts")
def __init__(self, mailObject): Composite.__init__(self) self.countLabel = HTML() self.newerButton = HTML("<a href='javascript:;'>< newer</a>", True) self.olderButton = HTML("<a href='javascript:;'>older ></a>", True) self.startIndex = 0 self.selectedRow = -1 self.table = FlexTable() self.navBar = HorizontalPanel() self.mailObject = mailObject # Setup the table. self.table.setCellSpacing(0) self.table.setCellPadding(2) self.table.setWidth("100%") # Hook up events. self.table.addTableListener(self) self.newerButton.addClickListener(self) self.olderButton.addClickListener(self) # Create the 'navigation' bar at the upper-right. innerNavBar = HorizontalPanel() innerNavBar.setStyleName("mail-ListNavBar") innerNavBar.setSpacing(8) innerNavBar.add(self.newerButton) innerNavBar.add(self.countLabel) innerNavBar.add(self.olderButton) self.navBar.setHorizontalAlignment(HasAlignment.ALIGN_RIGHT) self.navBar.add(innerNavBar) self.navBar.setWidth("100%") self.initWidget(self.table) self.setStyleName("mail-List") self.initTable() self.update()
def __init__(self): Composite.__init__(self)