Class Textarea

java.lang.Object
com.groiss.gui.AbstractComponent
com.groiss.gui.component.Textarea
All Implemented Interfaces:
Component, Serializable, Cloneable

public class Textarea extends AbstractComponent
Textarea component is used to enter more than one line of text. it should be used in conjunction with the ROWS and COLS attributes to set the size of the textarea.
See Also:
  • Constructor Details

    • Textarea

      public Textarea()
      constructs a new empty textarea
    • Textarea

      public Textarea(String name, int rows, int cols)
      standard constructor
      Parameters:
      rows - - number of rows (height of the textarea)
      cols - - number of columns (width of the textarea)
    • Textarea

      public Textarea(String name, int rows, int cols, String value)
      constructor
      Parameters:
      name - the name and id
      rows - number of rows
      cols - number of columns
      value - the initial set text
    • Textarea

      public Textarea(String name, int rows, int cols, String text, String styleClass)
      constructor
      Parameters:
      rows - number of rows
      cols - number of columns
      text - the initial set text
      styleClass - the name of a CSS class
  • Method Details

    • setSize

      public void setSize(int rows, int cols)
      sets the size of the textarea - rows and columns
      Parameters:
      rows - - the number of rows
      cols - - the number of columns
    • setRows

      public void setRows(int rows)
      sets the number of rows
      Parameters:
      rows - - the number of rows
    • getRows

      public int getRows()
    • setCols

      public void setCols(int cols)
      sets the number of columns
      Parameters:
      cols - - the number of columns
    • getCols

      public int getCols()
    • setWrapMode

      public void setWrapMode(String wrap)
      sets how to handle word-wrapping display in the textarea
      Parameters:
      wrap - - the wrap mode; must be "virtual", "off" or "physical"
    • getWrapMode

      public String getWrapMode()
    • setText

      public void setText(String text)
      sets the text
      Parameters:
      text - - the text String
    • getText

      public String getText()
    • setContent

      public void setContent(Object o)
      Set the text of the textarea.
      Specified by:
      setContent in interface Component
      Overrides:
      setContent in class AbstractComponent
      Parameters:
      o - any object where the string representation is used for rendering
    • getContent

      public Object getContent()
      Specified by:
      getContent in interface Component
      Overrides:
      getContent in class AbstractComponent
      Returns:
      the content object of the component