List of usage examples for com.google.gwt.user.client.ui ListBox setVisibleItemCount
public void setVisibleItemCount(int visibleItems)
From source file:ace.client.JSEditorToolbar.java
License:Apache License
private ListBox createColorList(String caption) { ListBox lb = new ListBox(); lb.addChangeHandler(handler);/*from ww w . jav a 2 s. co m*/ lb.setVisibleItemCount(1); lb.addItem(caption); /* lb.addItem(strings.white(), "white"); lb.addItem(strings.black(), "black"); lb.addItem(strings.red(), "red"); lb.addItem(strings.green(), "green"); lb.addItem(strings.yellow(), "yellow"); lb.addItem(strings.blue(), "blue"); */ return lb; }
From source file:ace.client.JSEditorToolbar.java
License:Apache License
private ListBox createFontList() { ListBox lb = new ListBox(); lb.addChangeHandler(handler);/* w w w.java2 s .c o m*/ lb.setVisibleItemCount(1); /* lb.addItem(strings.font(), ""); lb.addItem(strings.normal(), ""); lb.addItem("Times New Roman", "Times New Roman"); lb.addItem("Arial", "Arial"); lb.addItem("Courier New", "Courier New"); lb.addItem("Georgia", "Georgia"); lb.addItem("Trebuchet", "Trebuchet"); lb.addItem("Verdana", "Verdana"); */ return lb; }
From source file:ace.client.JSEditorToolbar.java
License:Apache License
private ListBox createFontSizes() { ListBox lb = new ListBox(); lb.addChangeHandler(handler);/* w w w . j ava 2 s. c o m*/ lb.setVisibleItemCount(1); /* lb.addItem(strings.size()); lb.addItem(strings.xxsmall()); lb.addItem(strings.xsmall()); lb.addItem(strings.small()); lb.addItem(strings.medium()); lb.addItem(strings.large()); lb.addItem(strings.xlarge()); lb.addItem(strings.xxlarge()); */ return lb; }
From source file:asquare.gwt.tests.focus.client.Demo.java
License:Apache License
private Widget createFocusPanel() { Table outer = new Table(); outer.add(new FocusPanel(new Label("Label in a FocusPanel"))); outer.add(new Button("Button")); outer.add(new CheckBox("CheckBox")); outer.add(new TextBox()); outer.add(new PasswordTextBox()); outer.add(new TextArea()); outer.add(new RadioButton("group1", "RadioButton1")); outer.add(new RadioButton("group1", "RadioButton2")); ListBox listBox1 = new ListBox(); listBox1.addItem("ListBox1"); listBox1.addItem("item2"); listBox1.addItem("item3"); outer.add(listBox1);// w w w . ja v a2 s. c om ListBox listBox2 = new ListBox(true); listBox2.setVisibleItemCount(3); listBox2.addItem("ListBox2"); listBox2.addItem("item2"); listBox2.addItem("item3"); outer.add(listBox2); Tree tree = new Tree(); tree.addItem("Tree"); tree.addItem("item2"); tree.addItem("item3"); outer.add(tree); return outer; }
From source file:asquare.gwt.tk.uitest.popuppanel.client.Demo.java
License:Apache License
private Widget createTransparencyTest() { RowPanel outer = new RowPanel(); BasicToolTip toolTip = new BasicToolTip(); Controller ttController = new BasicToolTipController(toolTip); outer.add(new HTML("<h3>Popup transparency</h3><p>Hover over a widget</p>")); ListBox list = new ListBox(true); list.setVisibleItemCount(4); list.addItem("ListBox"); list.addItem("1"); list.addItem("2"); list.addItem("3"); list.addItem("4"); list.addItem("5"); outer.add(new ToolTipWrapper(list, "Popup transparency over a ListBox").addController(ttController)); outer.add(new ToolTipWrapper(new Frame("FrameContents.html"), "Popup transparency over a Frame") .addController(ttController)); outer.add(new ToolTipWrapper(new RadioButton("radioGroup", "RadioButton a"), "Choice a") .addController(ttController)); outer.add(new ToolTipWrapper(new RadioButton("radioGroup", "RadioButton b"), "Choice b") .addController(ttController)); outer.add(new ToolTipWrapper(new RadioButton("radioGroup", "RadioButton c"), "Choice c") .addController(ttController)); return outer; }
From source file:at.ac.fhcampuswien.atom.client.gui.attributes.components.RichTextToolbar.java
License:Open Source License
/** Method to create the fontlist for the toolbar **/ private ListBox createFontList() { ListBox mylistBox = new ListBox(); mylistBox.addChangeHandler(evHandler); mylistBox.setVisibleItemCount(1); mylistBox.addItem(GUI_LISTNAME_FONTS); for (String name : GUI_FONTLIST.keySet()) { mylistBox.addItem(name, GUI_FONTLIST.get(name)); }/* w ww. j a v a 2 s . c om*/ return mylistBox; }
From source file:at.ac.fhcampuswien.atom.client.gui.attributes.components.RichTextToolbar.java
License:Open Source License
/** Method to create the colorlist for the toolbar **/ private ListBox createColorList() { ListBox mylistBox = new ListBox(); mylistBox.addChangeHandler(evHandler); mylistBox.setVisibleItemCount(1); mylistBox.addItem(GUI_LISTNAME_COLORS); for (String name : GUI_COLORLIST.keySet()) { mylistBox.addItem(name, GUI_COLORLIST.get(name)); }// ww w. jav a 2s.c o m return mylistBox; }
From source file:ca.aeso.evq.client.widgets.DatePicker.java
License:Apache License
private Widget drawControls(ListBox names, Label name, int prev, int next, int set) { HorizontalPanel hp = new HorizontalPanel(); hp.setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER); hp.addStyleName(STYLE_CONTROL_BLOCK); if (names == dateTable.monthNames()) { monthAction = set;// ww w. j a v a 2 s .c om } else { yearAction = set; } // move left // if (!showYearMonthListing || set == ACTION_SET_MONTH) { // DatePickerCell left = new DatePickerCell("\u00ab"); // \u00ab is << // left.setType(LocaleCalendarUtils.TYPE_CONTROL); // left.setValue(prev); // left.addStyleName(STYLE_CONTROL); // left.addClickListener(this); // hp.add(left); // } // Need list box or not if (showYearMonthListing) { names.setVisibleItemCount(1); names.addStyleName(STYLE_CONTROL_MENU); names.addChangeListener(this); hp.add(names); } else { name.addStyleName(STYLE_TITLE); hp.add(name); } // move right // if (!showYearMonthListing || set == ACTION_SET_MONTH) { // DatePickerCell right = new DatePickerCell("\u00bb"); // \u00ab is >> // right.setType(LocaleCalendarUtils.TYPE_CONTROL); // right.setValue(next); // right.addStyleName(STYLE_CONTROL); // right.addClickListener(this); // hp.add(right); // } return hp; }
From source file:cazcade.vortex.widgets.client.misc.toolbar.RichTextToolbar.java
License:Apache License
@Nonnull private ListBox createColorList(final String caption) { final ListBox lb = new ListBox(); lb.addChangeListener(listener);//from w ww . j a va 2s. co m lb.setVisibleItemCount(1); lb.addItem(caption); lb.addItem(strings.white(), "white"); lb.addItem(strings.black(), "black"); lb.addItem(strings.red(), "red"); lb.addItem(strings.green(), "green"); lb.addItem(strings.yellow(), "yellow"); lb.addItem(strings.blue(), "blue"); return lb; }
From source file:cazcade.vortex.widgets.client.misc.toolbar.RichTextToolbar.java
License:Apache License
@Nonnull private ListBox createFontList() { final ListBox lb = new ListBox(); lb.addChangeListener(listener);//from www . java2 s . c o m lb.setVisibleItemCount(1); lb.addItem(strings.font(), ""); lb.addItem(strings.normal(), ""); lb.addItem("Times New Roman", "Times New Roman"); lb.addItem("Arial", "Arial"); lb.addItem("Courier New", "Courier New"); lb.addItem("Georgia", "Georgia"); lb.addItem("Trebuchet", "Trebuchet"); lb.addItem("Verdana", "Verdana"); return lb; }