@Override public void execute() { variableValueTextBox.setText(""); } },
/** * {@inheritDoc} */ @Override public int getSelectionLength() { return getImpl().getTextAreaSelectionLength(getElement()); }
@Override protected String getValue() { if (widget != null) { return widget.getValue(); } return null; } }
@Override public TextArea createWidget() { final TextArea textArea = new TextArea(); textArea.addKeyDownHandler(KeyDownEvent::stopPropagation); textArea.addMouseDownHandler(MouseDownEvent::stopPropagation); return textArea; }
private Widget createTextBox() { textArea.setTitle( GuidedRuleEditorResources.CONSTANTS.ThisIsADrlExpressionFreeForm() ); textArea.setText( this.action.getText() ); textArea.setEnabled( !this.readOnly ); textArea.setPlaceholder( constants.AddFreeFormDrlDotDotDot() ); if ( !this.readOnly ) { textArea.addValueChangeHandler( new ValueChangeHandler<String>() { public void onValueChange( ValueChangeEvent<String> event ) { action.setText( textArea.getText() ); setModified( true ); } } ); } return textArea; }
@UiHandler("pomDescriptionTextArea") public void onDescriptionChange(final ValueChangeEvent<String> event) { presenter.onDescriptionChange(pomDescriptionTextArea.getText()); } }
@Override protected FormGroup getFormGroup(RenderMode renderMode) { DefaultFormGroup formGroup = formGroupsInstance.get(); if (renderMode.equals(RenderMode.PRETTY_MODE)) { HTML html = new HTML(); formGroup.render(html, field); } else { String inputId = generateUniqueId(); textArea = new TextArea(); textArea.setId(inputId); textArea.setName(fieldNS); textArea.setPlaceholder(field.getPlaceHolder()); textArea.setVisibleLines(field.getRows()); textArea.setEnabled(!field.getReadOnly()); textArea.setVisibleLines(field.getRows()); formGroup.render(inputId, textArea, field); } return formGroup; }
public void edit(final GridBodyCellEditContext context) { if (readOnly) { throw new IllegalStateException("A read only header cannot be edited"); } if (!isEditingMode) { factory.attachDomElement(context, (e) -> { e.getWidget().setText(getTitle()); if (e instanceof ScenarioHeaderTextAreaDOMElement) { ((ScenarioHeaderTextAreaDOMElement) e).setScenarioHeaderMetaData(this); } }, (e) -> e.getWidget().setFocus(true)); isEditingMode = true; } }
/** * Get the TextAreaElement for the widget * * @return TextAreaElement element of the widget */ private TextAreaElement getTextAreaElement() { return getElement().cast(); }
/** * Creates a TextArea widget that wraps an existing <textarea> * element. * <p/> * This element must already be attached to the document. If the element is * removed from the document, you must call * {@link RootPanel#detachNow(Widget)}. * * @param element the element to be wrapped * @return TextArea */ public static TextArea wrap(final Element element) { // Assert that the element is attached. assert Document.get().getBody().isOrHasChild(element); final TextArea textArea = new TextArea(element); // Mark it attached and remember it for cleanup. textArea.onAttach(); RootPanel.detachOnWindowClose(textArea); return textArea; }
@Override public void setReadOnly(boolean isReadOnly) { description.setEnabled(!isReadOnly); }
@Override public TextAreaDOMElement createDomElement(final GridLayer gridLayer, final GridWidget gridWidget, final GridBodyCellRenderContext context) { this.widget = createWidget(); this.e = new TextAreaDOMElement(widget, gridLayer, gridWidget, sessionManager, sessionCommandManager, hasNoValueCommand, hasValueCommand); widget.addBlurHandler((event) -> { destroyResources(); gridPanel.setFocus(true); }); return e; }
@UiHandler("pomDescriptionTextArea") public void onDescriptionChange(final ValueChangeEvent<String> event) { presenter.onDescriptionChange(pomDescriptionTextArea.getText()); } }
private Widget createTextBox() { textArea.setTitle( GuidedRuleEditorResources.CONSTANTS.ThisIsADrlExpressionFreeForm() ); textArea.setText( this.action.getText() ); textArea.setEnabled( !this.readOnly ); textArea.setPlaceholder( constants.AddFreeFormDrlDotDotDot() ); if ( !this.readOnly ) { textArea.addValueChangeHandler( new ValueChangeHandler<String>() { public void onValueChange( ValueChangeEvent<String> event ) { action.setText( textArea.getText() ); setModified( true ); } } ); } return textArea; }
/** * Get the TextAreaElement for the widget * * @return TextAreaElement element of the widget */ private TextAreaElement getTextAreaElement() { return getElement().cast(); }
/** * Creates a TextArea widget that wraps an existing <textarea> * element. * <p/> * This element must already be attached to the document. If the element is * removed from the document, you must call * {@link RootPanel#detachNow(Widget)}. * * @param element the element to be wrapped * @return TextArea */ public static TextArea wrap(final Element element) { // Assert that the element is attached. assert Document.get().getBody().isOrHasChild(element); final TextArea textArea = new TextArea(element); // Mark it attached and remember it for cleanup. textArea.onAttach(); RootPanel.detachOnWindowClose(textArea); return textArea; }
@Override protected void setReadOnly(boolean readOnly) { textArea.setEnabled(!readOnly); }
@Override public T createDomElement(final GridLayer gridLayer, final GridWidget gridWidget, final GridBodyCellRenderContext context) { this.widget = createWidget(); this.e = internalCreateDomElement(widget, gridLayer, gridWidget); widget.addBlurHandler(event -> { destroyResources(); gridLayer.batch(); gridPanel.setFocus(true); }); return e; }
@Override public void execute() { variableValueTextBox.setText( "" ); } }, null,
@EventHandler("addCommentButton") public void addCommentButton(ClickEvent e) { presenter.addTaskComment(newTaskCommentTextArea.getText()); }