List of usage examples for com.google.gwt.user.client.ui Label addClickHandler
public HandlerRegistration addClickHandler(ClickHandler handler)
From source file:com.bradrydzewski.gwt.calendar.client.CalendarView.java
License:Open Source License
protected void addDayClickHandler(final Label dayLabel, final Date day) { dayLabel.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { fireSelectedDay(day);// w w w. j a va2 s. c o m } }); }
From source file:com.bradrydzewski.gwt.calendar.client.CalendarView.java
License:Open Source License
protected void addWeekClickHandler(final Label weekLabel, final Date day) { weekLabel.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { fireSelectedWeek(day);/*from w ww . ja va 2 s.c om*/ } }); }
From source file:com.bradrydzewski.gwt.calendar.client.dayview.DayViewHeader.java
License:Open Source License
private void addDayClickHandler(final Label dayLabel, final Date day) { dayLabel.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { fireSelectedDay(day);/* w w w . j a va 2s.c om*/ } }); }
From source file:com.bradrydzewski.gwt.calendar.client.dayview.DayViewHeader.java
License:Open Source License
private void addWeekClickHandler(final Label weekLabel, final Date day) { weekLabel.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { fireSelectedWeek(day);//from w ww . j a v a2 s . co m } }); }
From source file:com.brainz.wokhei.client.about.AboutModulePart.java
private Label addMenuItem(Panel menu, final String title, final Panel panel, final String token) { Label menuItem = new Label(); menuItem.setStyleName("labelButton"); menuItem.addStyleName("menuItem"); menuItem.setText(title);/*from w ww . java 2 s. com*/ menuItem.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { _title.setText(title); hideAllPanels(); panel.setVisible(true); _text.setVisible(false); History.newItem(token, false); applyCufon(); } }); menu.add(menuItem); return menuItem; }
From source file:com.brainz.wokhei.client.about.AboutModulePart.java
/** * @return/*from w w w .j a va2 s.co m*/ */ private Label addMenuItem(Panel menu, final String title, final String text, final String token) { Label menuItem = new Label(); menuItem.setStyleName("labelButton"); menuItem.addStyleName("menuItem"); menuItem.setText(title); menuItem.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { _title.setText(title); _text.setHTML(text); hideAllPanels(); _text.setVisible(true); History.newItem(token, false); applyCufon(); } }); menu.add(menuItem); return menuItem; }
From source file:com.brainz.wokhei.client.home.OrderBrowserModulePart.java
private void setupDownloadStuff(final Status status) { downloadPanel = new VerticalPanel(); downloadPanel.setSpacing(5);/*from w w w. ja va2s .c o m*/ Label downloadPng = new Label(Messages.DOWNLOAD_RASTERIZED.getString()); downloadPng.setStyleName("labelButton"); downloadPng.addStyleName("downloadLabelLink"); downloadPng.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (status.equals(Status.BOUGHT)) { Window.open(GWT.getHostPageBaseURL() + "wokhei/getfile?orderid=" + _currentOrder.getId() + "&fileType=" + FileType.PNG_LOGO, "_new", ""); } } }); downloadPanel.add(downloadPng); if (status.equals(Status.BOUGHT)) { Label downloadPdf = new Label(Messages.DOWNLOAD_VECTORIAL.getString()); downloadPdf.setStyleName("labelButton"); downloadPdf.addStyleName("downloadLabelLink"); downloadPdf.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { Window.open(GWT.getHostPageBaseURL() + "wokhei/getfile?orderid=" + _currentOrder.getId() + "&fileType=" + FileType.PDF_VECTORIAL_LOGO, "_new", ""); } }); downloadPanel.add(downloadPdf); } downloadPanelContainer.add(downloadPanel); }
From source file:com.chinarewards.gwt.license.client.core.ui.impl.SimpleMenuProcessor.java
/** * //from w w w .jav a 2 s .co m * * @param parent * @param node */ private void addSubTreeNode(TreeItem parent, final MenuNode node) { TreeItem item = new TreeItem(); Grid grid = new Grid(1, 2); // if (node.getValue().getIcon() != null) { // // grid.setWidget(0, 0, node.getValue().getIcon()); // } else { // // default menu icon // // grid.setWidget(0, 0, new Image(resources.getDefaultMenuIcon())); // } // setup handler to fire menu click event Label text = new Label(node.getValue().getTitle()); text.addClickHandler(new ClickHandler() { public void onClick(ClickEvent paramClickEvent) { eventBus.fireEvent(new MenuClickEvent(node.getValue())); } }); grid.setWidget(0, 1, text); // make it visible item.setWidget(grid); item.setVisible(true); item.setState(true); parent.addItem(item); // continue processing child menus if any. for (MenuNode i : node.getChildren()) { addSubTreeNode(item, i); } }
From source file:com.chinarewards.gwt.license.client.core.ui.impl.SimpleSiteManager.java
public void openEditor(final Editor e) { // store which tab is which instanceId openedEditors.add(e);//from w w w .jav a 2 s . c o m HorizontalPanel panel = new HorizontalPanel(); Label close = new Label(" "); close.setStyleName("close"); close.addClickHandler(new ClickHandler() { public void onClick(ClickEvent paramClickEvent) { Platform.getInstance().getEditorRegistry().closeEditor(e.getEditorId(), e.getInstanceId()); } }); Label title = new Label(e.getTitle()); title.setStyleName("tabTitle"); Label leftImg = new Label(""); leftImg.setStyleName("leftImg"); Label rightImg = new Label(""); rightImg.setStyleName("rightImg"); panel.add(leftImg); panel.add(title); panel.add(close); panel.add(rightImg); panel.setCellHorizontalAlignment(leftImg, HorizontalPanel.ALIGN_RIGHT); panel.setCellHorizontalAlignment(title, HorizontalPanel.ALIGN_RIGHT); panel.setCellHorizontalAlignment(close, HorizontalPanel.ALIGN_LEFT); panel.setCellHorizontalAlignment(rightImg, HorizontalPanel.ALIGN_RIGHT); ScrollPanel sp = new ScrollPanel(e.asWidget()); editor.add(sp); // editor.add(e.asWidget(), g); // show editor panels only if there is at least one editor opened. if (!openedEditors.isEmpty()) { editor.setVisible(true); } }
From source file:com.cms.gwt.fs.client.view.calendar.ExtMultiView.java
License:Apache License
private void addTab(RoundedPanel label, Label button) { items.add(label);//from w w w. j av a 2 s .com items.add(button); button.addClickHandler(this); viewType.add(new HTML(" ")); label.addStyleName("Calendar-ViewTypeOptions"); viewType.add(label); }