private void checkLogLabel () { if (log == null) { ((GwtApplication)Gdx.app).log = log = new TextArea(); // It's possible that log functions are called // before the app is initialized. E.g. SoundManager can call log functions before the app is initialized. // Since graphics is null, we're getting errors. The log size will be updated later, in case graphics was null if (Gdx.graphics != null) { log.setSize(Gdx.graphics.getWidth() + "px", "200px"); } else { log.setSize("400px", "200px"); // Dummy value } log.setReadOnly(true); ((GwtApplication)Gdx.app).getRootPanel().add(log); } }
private void checkLogLabel () { if (log == null) { ((GwtApplication)Gdx.app).log = log = new TextArea(); // It's possible that log functions are called // before the app is initialized. E.g. SoundManager can call log functions before the app is initialized. // Since graphics is null, we're getting errors. The log size will be updated later, in case graphics was null if (Gdx.graphics != null) { log.setSize(Gdx.graphics.getWidth() + "px", "200px"); } else { log.setSize("400px", "200px"); // Dummy value } log.setReadOnly(true); ((GwtApplication)Gdx.app).getRootPanel().add(log); } }
/** * Creates a TextArea widget that wraps an existing <textarea> * element. * * 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 */ public static TextArea wrap(Element element) { // Assert that the element is attached. assert Document.get().getBody().isOrHasChild(element); TextArea textArea = new TextArea(element); // Mark it attached and remember it for cleanup. textArea.onAttach(); RootPanel.detachOnWindowClose(textArea); return textArea; }
protected TextArea createWidget() { return new TextArea(); } }
public static TextArea createTextArea() { final TextArea textField = new TextArea(); textField.setStyleName( "formText" ); return textField; }
/** {@inheritDoc} */ @Override protected TextArea getTextBox() { if (textBox == null) { textBox = new TextArea(); Object value = getValue(); if (value != null) { String text = String.valueOf(value); int lines = text.split("\n").length + 1; ((TextArea)textBox).setVisibleLines(lines); } } return (TextArea) textBox; } }
public MaterialTextArea() { super(new TextArea()); setType(InputType.TEXT); valueBoxBase.setStyleName(CssName.MATERIALIZE_TEXTAREA); }
private static TextArea buildTextArea(String name, String value) { TextArea textArea = new TextArea(); textArea.setName(name); textArea.setValue(value); return textArea; }
public Widget getWidget() { TextArea ta = new TextArea(); ta.setWidth( stdFieldWidth + "px" ); ta.setHeight( "120px" ); return ta; }
public MaterialTextArea() { super(new TextArea()); setType(InputType.TEXT); valueBoxBase.setStyleName(CssName.MATERIALIZE_TEXTAREA); }
public Widget getWidget() { TextArea ta = new TextArea(); ta.setWidth( stdFieldWidth + "px" ); ta.setHeight( "120px" ); return ta; }
protected InputTextArea(InputTextArea source) { super(new TextArea(), source); this.setMaxLength(source.getMaxLength()); if (source.rows != null) { this.setRows(source.rows); } }
/** * Create an new codemirrorpanel with a custom configuration. * @param config the configuration. */ public CodeMirrorPanel(Config config) { super(); this.config = config; setWidth("100%"); setHeight("100%"); textArea = new TextArea(); setWidget(textArea); }
protected InputTextArea(InputTextArea source) { super(new TextArea(), source); this.setMaxLength(source.getMaxLength()); if (source.rows != null) { this.setRows(source.rows); } }
public InputTextArea() { super(new TextArea()); this.setParser(StringParser.get()); this.setRenderer(StringRenderer.get()); }
public InputTextArea() { super(new TextArea()); this.setParser(StringParser.get()); this.setRenderer(StringRenderer.get()); }
private void initializeTextFields() { emailText = new TextBox(); emailText.setStyleName( ELEMENT_STYLE ); emailText.setVisibleLength(50); emailText.setMaxLength(70); messageText = new TextArea(); messageText.setStyleName( ELEMENT_STYLE ); messageText.setVisibleLines(4); clearTextFields(); }
private void setup(int numLines) { textArea = new TextArea(); textArea.setName(name); textArea.setTitle(title); textArea.setTabIndex(0); valueChangeHandler = new ValueChangeHandler<String>() { @Override public void onValueChange(ValueChangeEvent<String> event) { setModified(true); setUndefined(event.getValue().equals("")); } }; textArea.addValueChangeHandler(valueChangeHandler); textArea.setVisibleLines(numLines); wrapper = new InputElementWrapper(textArea, this); }
private void checkLogLabel () { if (log == null) { ((GwtApplication)Gdx.app).log = log = new TextArea(); // It's possible that log functions are called // before the app is initialized. E.g. SoundManager can call log functions before the app is initialized. // Since graphics is null, we're getting errors. The log size will be updated later, in case graphics was null if (Gdx.graphics != null) { log.setSize(Gdx.graphics.getWidth() + "px", "200px"); } else { log.setSize("400px", "200px"); // Dummy value } log.setReadOnly(true); ((GwtApplication)Gdx.app).getRootPanel().add(log); } }
@Override protected TabItem createGeneralTab() { final TabItem tab = new TabItem(CrudRs.TXT.generalSetting()); tab.addField(id, CrudRs.TXT.id()); event = new ExChosenValueListBox<>(binding, new ModelNameRenderer<SystemEventModel>(), new ModelIdProvidesKey<SystemEventModel>()); tab.addField(event, AdminModuleRs.MSG.event()); subject = new TextBox(); tab.addField(subject, AdminModuleRs.MSG.subject()); template = new TextArea(); tab.addField(template, AdminModuleRs.MSG.template()); return tab; }