01: /*
02: * MyGWT Widget Library
03: * Copyright(c) 2007, MyGWT.
04: * licensing@mygwt.net
05: *
06: * http://mygwt.net/license
07: */
08: package net.mygwt.samples.explorer.client;
09:
10: import net.mygwt.ui.client.widget.Button;
11: import net.mygwt.ui.client.widget.IconButton;
12: import net.mygwt.ui.client.widget.WidgetContainer;
13:
14: import com.google.gwt.user.client.ui.HTML;
15: import com.google.gwt.user.client.ui.HorizontalPanel;
16: import com.google.gwt.user.client.ui.TextBox;
17: import com.google.gwt.user.client.ui.VerticalPanel;
18:
19: public class ToolTipPage extends Page {
20:
21: protected void createWidget(WidgetContainer container) {
22: VerticalPanel vp = new VerticalPanel();
23: vp.setSpacing(10);
24:
25: Button btn = new Button("Print");
26: btn.setIconStyle("icon-printer");
27: btn.setToolTip("Information", "Prints the current document");
28: vp.add(btn);
29:
30: IconButton info = new IconButton("icon-info-white");
31: info.setToolTip("Enter your full name");
32:
33: HorizontalPanel hp = new HorizontalPanel();
34: hp.setSpacing(2);
35: hp.setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);
36: hp.add(new HTML("<span class=my-label>Name:</span>"));
37: hp.add(new TextBox());
38: hp.add(info);
39: vp.add(hp);
40:
41: container.add(vp);
42: }
43:
44: }
|