Class FWTextArea

All Implemented Interfaces:
FocusListener, MouseListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, DocumentListener, Scrollable

public class FWTextArea extends JTextArea implements MouseListener, FocusListener, DocumentListener
Predefines some default behaviour for text-inputfields.
Author:
jschoder, hschmitt
See Also:
  • Constructor Details

    • FWTextArea

      public FWTextArea(boolean aRequired)
      Default constructor. Sets the default-textsize to this field.
    • FWTextArea

      public FWTextArea(String aString, boolean aRequired)
      Default constructor. Sets the default-textsize to this field.
    • FWTextArea

      public FWTextArea(String aString, int aMaxSize, boolean aRequired)
      Default constructor. Sets the default-textsize to this field.
    • FWTextArea

      public FWTextArea(int aMaxSize, boolean aRequired)
      This construcotr has the maxsize as parameter. This allows the developer to choose a size different from the default.
    • FWTextArea

      public FWTextArea(String aString, int aMaxSize, int aMaxInput, boolean aRequiredBorder)
      This construcotr has the maxsize and the maxInput as parameter. This allows the developer separate the MaxSize and the max. input of letters
    • FWTextArea

      public FWTextArea(String aString, int aMaxSize, int aMaxInput, boolean aRequiredBorder, String aRegularExpression)
      This construcotr has the maxsize and the maxInput as parameter. This allows the developer separate the MaxSize and the max. input of letters
  • Method Details

    • createDefaultModel

      public Document createDefaultModel()
      Returns a new instance of LimitedDocument.
      Overrides:
      createDefaultModel in class JTextArea
    • mouseReleased

      public void mouseReleased(MouseEvent aMouseEvent)
      Specified by:
      mouseReleased in interface MouseListener
      See Also:
    • mouseEntered

      public void mouseEntered(MouseEvent aMouseEvent)
      Specified by:
      mouseEntered in interface MouseListener
    • mouseExited

      public void mouseExited(MouseEvent aMouseEvent)
      Specified by:
      mouseExited in interface MouseListener
    • mousePressed

      public void mousePressed(MouseEvent aMouseEvent)
      Specified by:
      mousePressed in interface MouseListener
    • mouseClicked

      public void mouseClicked(MouseEvent aMouseEvent)
      Specified by:
      mouseClicked in interface MouseListener
    • setText

      public void setText(String aText)
      Overrides:
      setText in class JTextComponent
      See Also:
    • focusGained

      public void focusGained(FocusEvent aFocusEvent)
      Specified by:
      focusGained in interface FocusListener
    • focusLost

      public void focusLost(FocusEvent aFocusEvent)
      Specified by:
      focusLost in interface FocusListener
    • updateColors

      public void updateColors()
    • getMaxSize

      public int getMaxSize()
      Returns:
      Returns the maxSize.
    • setMaxSize

      public void setMaxSize(int aMaxSize)
      Parameters:
      aMaxSize - The maxSize to set.
    • isRequired

      public boolean isRequired()
      Returns the required mode.
    • setEditable

      public void setEditable(boolean aEditable)
      Sets the editable property of the textfield.
      Overrides:
      setEditable in class JTextComponent
    • setRequired

      public void setRequired(boolean aRequired)
      Sets the required property of the textfield.
    • getRequiredBackgroundColor

      public Color getRequiredBackgroundColor()
      Returns the required background color.
    • setRequiredBackgroundColor

      public void setRequiredBackgroundColor(Color aRequiredBackgroundColor)
      Changes the required background color.
    • getDefaultBackgroundColor

      public Color getDefaultBackgroundColor()
      Returns the default background color.
    • setDefaultBackgroundColor

      public void setDefaultBackgroundColor(Color aDefaultBackgroundColor)
      Changes the default background color.
    • insertUpdate

      public void insertUpdate(DocumentEvent eDocumentEvent)
      Specified by:
      insertUpdate in interface DocumentListener
    • removeUpdate

      public void removeUpdate(DocumentEvent eDocumentEvent)
      Specified by:
      removeUpdate in interface DocumentListener
    • changedUpdate

      public void changedUpdate(DocumentEvent eDocumentEvent)
      Specified by:
      changedUpdate in interface DocumentListener
    • setDefaultForeground

      public void setDefaultForeground(Color aDefaultForeground)
      Sets the default forground color used for enabled fields
    • getDisabledBackground

      public Color getDisabledBackground()
      Returns:
      the background color for disabled components
    • setDisabledBackground

      public void setDisabledBackground(Color aDisabledBackground)
      Parameters:
      aDisabledBackground -
    • getDisabledForeground

      public Color getDisabledForeground()
      Returns:
      the foreground color for disabled components
    • setDisabledForeground

      public void setDisabledForeground(Color aDisabledForeground)
      Parameters:
      aDisabledForeground -
    • setBorder

      public void setBorder(Border aBorder)
      Overrides:
      setBorder in class JComponent
      See Also: