/** * Creates an empty text area. */ public TextArea() { super(Document.get().createTextAreaElement()); setStyleName("gwt-TextArea"); }
public static TextArea createTextArea() { final TextArea textField = new TextArea(); textField.setStyleName( "formText" ); return textField; }
/** * Takes the given text area and sets the style and limits how * many characters can be entered. * @param area * @param style * @return */ protected TextArea createTextArea(final TextArea area, final String style) { area.setStyleName( style ); area.getElement().setAttribute( MAX_LENGTH_ATTRIBUTE, Integer.toString( MAX_TEXT_AREA ) ); return area; } // TODO: move this somewhere more useful - perhaps in the common-services util's EmailMessage class
/** * Creates an empty text area. */ public TextArea() { super(Document.get().createTextAreaElement()); setStyleName("gwt-TextArea"); }
/** * Creates an empty text area. */ public TextArea() { super(Document.get().createTextAreaElement()); setStyleName("gwt-TextArea"); }
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(); }
public XmlDebugPanel(TreeTableModel model) { this.model = model; nodes = new IdentityHashMap<Object, Element>(); document = XMLParser.createDocument(); root = document.createElement("debug-panel"); initWidget(textArea = new TextArea()); textArea.ensureDebugId("debug-panel-xml"); textArea.setStyleName(Utils.style() + "-xml"); // Build the XML document based on the current state. document.appendChild(root); nodes.put(model.getRoot(), root); build(model.getRoot()); model.addTreeTableModelListener(this); }
public RuleContentWidget() { text = new TextArea(); text.setWidth( "100%" ); text.getElement().setAttribute( "spellcheck", "false" ); text.setStyleName( Resources.INSTANCE.CSS().defaultTextArea() ); text.addChangeHandler( new ChangeHandler() { public void onChange( ChangeEvent event ) { isDirty = true; } } ); text.addKeyDownHandler( new KeyDownHandler() { public void onKeyDown( KeyDownEvent event ) { if ( event.getNativeKeyCode() == KeyCodes.KEY_TAB ) { int pos = text.getCursorPos(); insertText( "\t" ); text.setCursorPos( pos + 1 ); text.cancelKey(); text.setFocus( true ); } } } ); initWidget( text ); }