List of usage examples for com.google.gwt.user.client.ui Label setText
public void setText(String text)
From source file:rocket.widget.client.SortableTable.java
License:Apache License
protected Label createLabel(final String text) { Checker.notEmpty("parameter:text", text); final Label label = new Label(); label.setText(text); label.addMouseEventListener(new MouseEventAdapter() { public void onClick(final MouseClickEvent mouseEvent) { onHeaderClick(mouseEvent.getWidget()); }/*from w w w. j ava 2 s . c o m*/ }); return label; }
From source file:scrum.client.test.DndTestWidget.java
License:Open Source License
public DndTestWidget() { AbsolutePanel dndPanel = new AbsolutePanel(); dndPanel.setPixelSize(400, 400);/* w w w .jav a2s. c o m*/ final Composite drag = new DragComposite(); final Label drop = new Label("drop"); PickupDragController dragController = new PickupDragController(RootPanel.get(), true); dragController.setBehaviorDragProxy(true); dragController.setBehaviorConstrainedToBoundaryPanel(false); dragController.setBehaviorMultipleSelection(true); DropController dropController = new DropController() { public Widget getDropTarget() { return drop; } public void onDrop(DragContext context) { drop.setText(drop.getText() + "."); } public void onEnter(DragContext context) { } public void onLeave(DragContext context) { } public void onMove(DragContext context) { } public void onPreviewDrop(DragContext context) throws VetoDragException { } }; dragController.registerDropController(dropController); dragController.makeDraggable(drag); dndPanel.add(drag); dndPanel.add(drop); initWidget(dndPanel); }
From source file:tv.dyndns.kishibe.qmaclone.client.game.input.InputWidgetSlot.java
License:Open Source License
private void updateSlot(int x) { final int start = x == ALL_DRUMS ? 0 : x; final int end = x == ALL_DRUMS ? width : x + 1; for (int xx = start; xx < end; ++xx) { for (int y = 0; y < 3; ++y) { final Label label = (Label) gridDrums.getWidget(y + 1, xx); label.setText(letters[xx][y]); }/* w w w .j ava 2 s . c om*/ } }
From source file:us.anarchia.gwt.client.ui.CopyrightDesigner.java
License:Open Source License
public CopyrightDesigner(Copyright aCopyright) { super(aCopyright); this.copyright = aCopyright; Label designerLabel = new Label(); designerLabel.setText("Copyright"); panel.add(designerLabel);//from w ww .java 2s .com fullName = new LabelEdit("Copyright Name") { public void onStringValueChanged(String newValue) { copyright.setName(newValue); } }; panel.add(fullName); date = new LabelEdit("Copyright Date") { public void onStringValueChanged(String newValue) { Date aDate = new Date(); aDate.setDate(newValue); copyright.setDate(aDate); } }; panel.add(date); licenseName = new LabelEdit("License Name") { public void onStringValueChanged(String newValue) { copyright.setLicenseName(newValue); } }; panel.add(licenseName); }
From source file:ywb.c.page.SearchPage.java
License:Apache License
void init(ScrollPanel scrollPanel, FlowPanel nested, final Label celebField) { scrollPanel.setSize("100%", "400px"); MiscUtils.populateNamesScrollPanel(null, new CallBack() { @Override//from ww w . j ava 2 s .c o m public void onClick(String name) { celebField.setText(name); } }, nested, ctx); }