List of usage examples for com.google.gwt.dom.client InputElement as
public static InputElement as(Element elem)
From source file:bz.davide.dmweb.shared.view.InputView.java
License:Open Source License
public void setText(String value) { if (AbstractHtmlElementView.clientSide) { InputElement.as(this.getElement()).setValue(value); } else {// www. ja v a2 s.co m this.setElementAttribute("value", value); } }
From source file:bz.davide.dmweb.shared.view.InputView.java
License:Open Source License
public String getValue() { return InputElement.as(this.getElement()).getValue(); }
From source file:cc.alcina.framework.gwt.client.widget.InputButton.java
License:Apache License
/** * Programmatic equivalent of the user clicking the button. */ public void click() { InputElement.as(getElement()).click(); }
From source file:ch.unifr.pai.twice.widgets.mpproxy.client.MPProxyBody.java
License:Apache License
/** * Replace all textboxes with multi focus text boxes * /* www. j a v a2 s .co m*/ * @param mainElement */ private void replaceAllTextBoxes(Element mainElement) { NodeList<com.google.gwt.dom.client.Element> inputFields = mainElement.getElementsByTagName("input"); for (int i = 0; i < inputFields.getLength(); i++) { final com.google.gwt.dom.client.Element el = inputFields.getItem(i); String type = el.getAttribute("type"); if (type == null || type.isEmpty() || type.equalsIgnoreCase("text")) { MultiFocusTextBox box = new MultiFocusTextBox(); box.replaceTextInput(InputElement.as(el)); replacements.add(box); // Scheduler.get().scheduleDeferred(new ScheduledCommand() { // // @Override // public void execute() { // el.getStyle().setDisplay(Display.NONE); // } // }); } } }
From source file:ch.unifr.pai.twice.widgets.mptransparentproxy.client.MPProxyBody.java
License:Apache License
/** * Replace all textboxes with multi focus text boxes * //w w w .ja v a 2s . c o m * @param mainElement */ private void replaceAllTextBoxes(Element mainElement) { NodeList<com.google.gwt.dom.client.Element> inputFields = mainElement.getElementsByTagName("input"); for (int i = 0; i < inputFields.getLength(); i++) { final com.google.gwt.dom.client.Element el = inputFields.getItem(i); String type = el.getAttribute("type"); if (type == null || type.isEmpty() || type.equalsIgnoreCase("text") || type.equalsIgnoreCase("search")) { MultiFocusTextBox box = new MultiFocusTextBox(); box.replaceTextInput(InputElement.as(el)); replacements.add(box); } } }
From source file:com.ait.toolkit.clientio.uploader.client.Uploader.java
License:Apache License
private void openFileDialog(FileUpload fileUpload, boolean multipleFiles) { if (multipleFiles) { fileUpload.getElement().setAttribute("multiple", "true"); } else {// w w w . j a v a 2 s . c o m fileUpload.getElement().removeAttribute("multiple"); } if (fileDialogStartHandler != null) { fileDialogStartHandler.onFileDialogStartEvent(new FileDialogStartEvent()); } InputElement.as(fileUpload.getElement()).click(); }
From source file:com.akjava.gwt.html5.client.input.ColorBox.java
License:Apache License
/** * This constructor may be used by subclasses to explicitly use an existing * element. This element must be an <input> element whose type is * 'hidden'.//from w w w . j a va 2 s . c om * * @param element the element to be used */ protected ColorBox(Element element) { assert InputElement.as(element).getType().equalsIgnoreCase("color"); setElement(element); }
From source file:com.arcbees.chosen.client.ChosenImpl.java
License:Apache License
protected void setupDisabledSearchField() { container.addClass(css.chznDisabled()); InputElement.as(searchField.get(0)).setDisabled(true); }
From source file:com.arcbees.chosen.client.ChosenImpl.java
License:Apache License
protected void setupEnabledSearchField() { container.removeClass(css.chznDisabled()); InputElement.as(searchField.get(0)).setDisabled(false); }
From source file:com.dianaui.universal.core.client.ui.base.mixin.FocusableMixin.java
License:Apache License
public static void setAccessKey(final UIObject uiObject, final char key) { final Element element = uiObject.getElement(); final String accessKey = Character.toString(key); if (AnchorElement.is(element)) { AnchorElement.as(element).setAccessKey(accessKey); } else if (ButtonElement.is(element)) { ButtonElement.as(element).setAccessKey(accessKey); } else if (InputElement.is(element)) { InputElement.as(element).setAccessKey(accessKey); }/* w ww. j a v a 2 s .c o m*/ }