diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2010-10-21 14:45:47 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2010-10-21 14:45:47 +0000 |
commit | 30a5dee6b6327a2f9f9b95e5748f27a7db657235 (patch) | |
tree | 9cd10624e9ef0e08a4ae9b8a3436b0be352a1e00 /src/com/vaadin/ui/TextArea.java | |
parent | 04ea1fd68fd6a7ef990b4ec3fa2d5fbb83bff5a8 (diff) | |
download | vaadin-framework-30a5dee6b6327a2f9f9b95e5748f27a7db657235.tar.gz vaadin-framework-30a5dee6b6327a2f9f9b95e5748f27a7db657235.zip |
#5865: class stubs + depracations towards one to one widget mapping
svn changeset:15648/svn branch:6.5
Diffstat (limited to 'src/com/vaadin/ui/TextArea.java')
-rw-r--r-- | src/com/vaadin/ui/TextArea.java | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/src/com/vaadin/ui/TextArea.java b/src/com/vaadin/ui/TextArea.java new file mode 100644 index 0000000000..1b8d6dc687 --- /dev/null +++ b/src/com/vaadin/ui/TextArea.java @@ -0,0 +1,98 @@ +package com.vaadin.ui; + +import com.vaadin.data.Property; +import com.vaadin.terminal.gwt.client.ui.VTextArea; + +@ClientWidget(VTextArea.class) +public class TextArea extends TextField { + + private static final int DEFAULT_ROWS = 5; + + public TextArea() { + setRows(DEFAULT_ROWS); + } + + public TextArea(String caption) { + super(caption); + setRows(DEFAULT_ROWS); + } + + public TextArea(Property dataSource) { + super(dataSource); + setRows(DEFAULT_ROWS); + } + + public TextArea(String caption, Property dataSource) { + super(caption, dataSource); + setRows(DEFAULT_ROWS); + } + + public TextArea(String caption, String value) { + super(caption, value); + setRows(DEFAULT_ROWS); + } + + /** + * Sets the number of rows in the editor. + * + * @param rows + * the number of rows for this editor. + */ + @Override + public void setRows(int rows) { + // TODO implement here once AbstractTextField (or something similar is + // created). + super.setRows(rows); + } + + /** + * Gets the number of rows in the editor. If the number of rows is set to 0, + * the actual number of displayed rows is determined implicitly by the + * adapter. + * + * @return number of explicitly set rows. + */ + @Override + public int getRows() { + // TODO implement here once AbstractTextField (or something similar is + // created). + return super.getRows(); + } + + /** + * Sets the editor's word-wrap mode on or off. + * + * @param wordwrap + * the boolean value specifying if the editor should be in + * word-wrap mode after the call or not. + */ + @Override + public void setWordwrap(boolean wordwrap) { + // TODO implement here once AbstractTextField (or something similar is + // created). + super.setWordwrap(wordwrap); + } + + /** + * Tests if the editor is in word-wrap mode. + * + * @return <code>true</code> if the component is in the word-wrap mode, + * <code>false</code> if not. + */ + @Override + public boolean isWordwrap() { + return super.isWordwrap(); + } + + // TODO deprecate in TextField and add javadocs without deprecation here?? + // @Override + // public void setHeight(float height, int unit) { + // super.setHeight(height, unit); + // } + // + // @Override + // public void setHeight(String height) { + // super.setHeight(height); + // } + +} |