@Override public void setFocus(boolean focused) { getListBox().setFocus(focused); }
@Override public void setFocus(boolean focused) { getListBox().setFocus(focused); }
public void execute() { choices.setFocus( true ); } } );
public void execute() { choices.setFocus( true ); } } );
public void setFocus( boolean fFocused ) { listBox.setFocus( fFocused ); }
public void setFocus( boolean fFocused ) { listBox.setFocus( fFocused ); }
/** {@inheritDoc} */ public void setFocus(boolean focus) { ListBox box = getListBox(); if (box != null) box.setFocus(focus); }
@Override public void setFocus(boolean focused) { getListBox().setFocus(focused); }
@Override public void setFocus(boolean focused) { getListBox().setFocus(focused); }
@Override public void editCell(CellEditInfo cellEditInfo, ColType cellValue, Callback<ColType> callback) { super.editCell(cellEditInfo, cellValue, callback); listBox.setFocus(true); }
@Override public void show(int left, int top) { setPopupPosition(left, top); super.show(); typesList.setFocus(true); }
@Override public void show() { super.show(); center(); machinesList.setFocus(true); }
public void onClick(final ClickEvent event) { final boolean checked = ((CheckBox) event.getSource()).getValue(); downsampler.setEnabled(checked); interval.setEnabled(checked); if (checked) { downsampler.setFocus(true); } } });
public boolean edit(WSGrid.WSCell element) { wsCellReference = element; editCellReference = this; Style s = listBox.getElement().getStyle(); s.setProperty("left", element.getAbsoluteLeft() + "px"); s.setProperty("top", element.getAbsoluteTop() + "px"); listBox.clear(); int i = 0; for (String v : values) { listBox.addItem(v); if (html.getHTML().equals(v)) listBox.setSelectedIndex(i); i++; } listBox.setVisible(true); listBox.setFocus(true); return true; }
protected static Set<String> moveSelectedItems(ListBox source, ListBox target) { final boolean[] sel = getSelectionBitmap(source); final Set<String> movedItems = new HashSet<>(); for (int i = 0; i < sel.length; i++) { if (sel[i]) { final int optionIndex = i - (sel.length - source.getItemCount()); movedItems.add(source.getValue(optionIndex)); // Move selection to another column final String text = source.getItemText(optionIndex); final String value = source.getValue(optionIndex); target.addItem(text, value); target.setItemSelected(target.getItemCount() - 1, true); source.removeItem(optionIndex); } } target.setFocus(true); return movedItems; }
private Set<String> moveAllItems(ListBox source, ListBox target) { final Set<String> movedItems = new HashSet<String>(); int size = source.getItemCount(); for (int i = 0; i < size; i++) { movedItems.add(source.getValue(i)); final String text = source.getItemText(i); final String value = source.getValue(i); target.addItem(text, value); target.setItemSelected(target.getItemCount() - 1, true); } target.setFocus(true); if (source.getItemCount() > 0) { target.setSelectedIndex(0); } source.clear(); return movedItems; }
@Override public void edit(final GridCell<String> cell, final GridBodyCellRenderContext context, final Consumer<GridCellValue<String>> callback) { factory.attachDomElement(context, e -> { final ListBox widget = e.getWidget(); widget.addItem("one"); widget.addItem("two"); if (cell != null && cell.getValue() != null) { for (int i = 0; i < widget.getItemCount(); i++) { if (widget.getItemText(i).equals(cell.getValue().getValue())) { widget.setSelectedIndex(i); break; } } } }, e -> e.getWidget().setFocus(true)); }
@Override public void edit(final GridCell<String> cell, final GridBodyCellRenderContext context, final Consumer<GridCellValue<String>> callback) { factory.attachDomElement(context, e -> { final ListBox widget = e.getWidget(); widget.addItem("one"); widget.addItem("two"); if (cell != null && cell.getValue() != null) { for (int i = 0; i < widget.getItemCount(); i++) { if (widget.getItemText(i).equals(cell.getValue().getValue())) { widget.setSelectedIndex(i); break; } } } }, e -> e.getWidget().setFocus(true)); }