private void initialiseBaseFileName() { txtBaseFileName.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { handleFileNameInputKeyUp(); } }); }
private void initialiseBaseFileName() { txtBaseFileName.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { handleFileNameInputKeyUp(); } }); }
public class TextBoxAndLabel implements HasKeyUpHandlers { private TextBox myTextBox; private Label myLabel; @Override public HandlerRegistration addKeyUpHandler(KeyUpHandler keyUpHandler) { return myTextBox.addKeyUpHandler(keyUpHandler); } }
private void addInputValueChangeHandlers(TextBox inputTextBox) { inputTextBox.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { if(!inputTextBox.getValue().equals(previousValue)){ updateResult(); } previousValue = inputTextBox.getValue(); } }); }
void attachDisplayLengthHandler(final TextBox box) { setBoxSize(box); box.addKeyUpHandler((e) -> setBoxSize(box)); }
void attachDisplayLengthHandler(final TextBox box) { setBoxSize(box); box.addKeyUpHandler((e) -> setBoxSize(box)); }
private void attachDisplayLengthHandler(final TextBox box) { int length = box.getText().length(); ((InputElement) box.getElement().cast()).setSize(length > 0 ? length : 1); box.addKeyUpHandler(new KeyUpHandler() { public void onKeyUp(KeyUpEvent event) { int length = box.getText().length(); ((InputElement) box.getElement().cast()).setSize(length > 0 ? length : 1); } }); }
private void attachDisplayLengthHandler(final TextBox box) { int length = box.getText().length(); ((InputElement) box.getElement().cast()).setSize(length > 0 ? length : 1); box.addKeyUpHandler(new KeyUpHandler() { public void onKeyUp(KeyUpEvent event) { int length = box.getText().length(); ((InputElement) box.getElement().cast()).setSize(length > 0 ? length : 1); } }); }
public EnumDropDown(final String currentValue, final DropDownValueChanged valueChanged, final DropDownData dropData, final boolean multipleSelect, final Path resource) { listBox = new ListBox(multipleSelect); this.valueChangedCommand = valueChanged; this.resource = resource; listBox.addChangeHandler(new ChangeHandler() { public void onChange(ChangeEvent event) { valueChangedCommand.valueChanged(encodeSelectedItems(), encodeSelectedItems()); } }); textBox.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { valueChanged.valueChanged(textBox.getValue(), textBox.getValue()); } }); setDropDownData(currentValue, dropData); }
public EnumDropDown(final String currentValue, final DropDownValueChanged valueChanged, final DropDownData dropData, final boolean multipleSelect, final Path resource) { listBox = new ListBox(multipleSelect); this.valueChangedCommand = valueChanged; this.resource = resource; listBox.addChangeHandler(new ChangeHandler() { public void onChange(ChangeEvent event) { valueChangedCommand.valueChanged(encodeSelectedItems(), encodeSelectedItems()); } }); textBox.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { valueChanged.valueChanged(textBox.getValue(), textBox.getValue()); } }); setDropDownData(currentValue, dropData); }
private TextBox textBoxEditor(final RuleMetadata rm, final boolean isReadOnly) { final TextBox box = GWT.create(TextBox.class); box.setEnabled(!isReadOnly); ((InputElement) box.getElement().cast()).setSize((rm.getValue().length() < 3) ? 3 : rm.getValue().length()); box.setText(rm.getValue()); box.addChangeHandler(new ChangeHandler() { public void onChange(ChangeEvent event) { rm.setValue(box.getText()); } }); box.addKeyUpHandler(new KeyUpHandler() { public void onKeyUp(KeyUpEvent event) { ((InputElement) box.getElement().cast()).setSize(box.getText().length()); } }); return box; }
private TextBox textBoxEditor(final RuleMetadata rm, final boolean isReadOnly) { final TextBox box = GWT.create(TextBox.class); box.setEnabled(!isReadOnly); ((InputElement) box.getElement().cast()).setSize((rm.getValue().length() < 3) ? 3 : rm.getValue().length()); box.setText(rm.getValue()); box.addChangeHandler(new ChangeHandler() { public void onChange(ChangeEvent event) { rm.setValue(box.getText()); } }); box.addKeyUpHandler(new KeyUpHandler() { public void onKeyUp(KeyUpEvent event) { ((InputElement) box.getElement().cast()).setSize(box.getText().length()); } }); return box; }
html.getElement().getStyle().setPosition(Position.ABSOLUTE); textBox.getElement().getStyle().setColor("transparent"); textBox.addKeyUpHandler(handler); textBox.getElement(); add(textBox);
private TextBox boundTextBox(final CallFieldValue c) { final TextBox box = TextBoxFactory.getTextBox(methodParameter.type); box.setStyleName("constraint-value-Editor"); if (c.value == null) { box.setText(""); } else { if (c.value.trim().equals("")) { c.value = ""; } box.setText(c.value); } if (c.value == null || c.value.length() < 5) { ((InputElement) box.getElement().cast()).setSize(6); } else { ((InputElement) box.getElement().cast()).setSize(c.value.length() - 1); } box.addValueChangeHandler(new ValueChangeHandler<String>() { public void onValueChange(final ValueChangeEvent<String> event) { c.value = event.getValue(); } }); box.addKeyUpHandler(new KeyUpHandler() { public void onKeyUp(KeyUpEvent event) { ((InputElement) box.getElement().cast()).setSize(box.getText().length()); } }); return box; }
private TextBox boundFormulaTextBox() { final TextBox box = new TextBox(); box.setStyleName("constraint-value-Editor"); if (this.methodParameter.getValue() == null) { box.setValue(""); } else { box.setValue(this.methodParameter.getValue()); } box.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { setMethodParameterValue(box.getValue()); } }); return box; }
private TextBox boundFormulaTextBox() { final TextBox box = new TextBox(); box.setStyleName("constraint-value-Editor"); if (this.methodParameter.getValue() == null) { box.setValue(""); } else { box.setValue(this.methodParameter.getValue()); } box.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { setMethodParameterValue(box.getValue()); } }); return box; }
subject.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { type.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { source.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) {
private TextBox boundLiteralTextBox() { final TextBox box = TextBoxFactory.getTextBox(methodParameter.getType()); // We need both handlers, since The textbox TextBoxFactory can return a box that changes the value in itself box.addValueChangeHandler(new ValueChangeHandler<String>() { @Override public void onValueChange(ValueChangeEvent<String> event) { setMethodParameterValue(box.getValue()); } }); box.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { setMethodParameterValue(box.getValue()); } }); box.setStyleName("constraint-value-Editor"); if (this.methodParameter.getValue() != null || this.methodParameter.getValue().isEmpty()) { box.setValue(this.methodParameter.getValue()); } // This updates the model setMethodParameterValue(box.getValue()); return box; }
private TextBox boundLiteralTextBox() { final TextBox box = TextBoxFactory.getTextBox(methodParameter.getType()); // We need both handlers, since The textbox TextBoxFactory can return a box that changes the value in itself box.addValueChangeHandler(new ValueChangeHandler<String>() { @Override public void onValueChange(ValueChangeEvent<String> event) { setMethodParameterValue(box.getValue()); } }); box.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { setMethodParameterValue(box.getValue()); } }); box.setStyleName("constraint-value-Editor"); if (this.methodParameter.getValue() != null || this.methodParameter.getValue().isEmpty()) { box.setValue(this.methodParameter.getValue()); } // This updates the model setMethodParameterValue(box.getValue()); return box; }
searchBox.addKeyUpHandler(event -> { if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) { stopPropagation(event);