fi.hut.tml.xsmiles.gui.components.swing
Class SwingTextArea

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.general.ComponentBase
      extended byfi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
          extended byfi.hut.tml.xsmiles.gui.components.swing.SwingTextComponent
              extended byfi.hut.tml.xsmiles.gui.components.swing.SwingTextArea
All Implemented Interfaces:
javax.swing.event.DocumentListener, java.util.EventListener, java.awt.event.FocusListener, XComponent, XText, XTextArea

public class SwingTextArea
extends SwingTextComponent
implements XTextArea

The only addition is add and remove this is extended from SwingComponent, which will add captions and styling etc

Author:
Mikko Honkala

Field Summary
 javax.swing.JScrollPane scrollPane
          the Scrollpane
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingTextComponent
fGUI, insideChangeEvent, textcomponent
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
HELPKEY
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
content, currentFont, currentZoom, defaultBGColor, defaultFont, defaultSize, fInputMode, hintText, style
 
Constructor Summary
SwingTextArea(java.lang.String s, GUI gui)
           
 
Method Summary
 void append(java.lang.String text)
           
 java.awt.Component createContent()
          creates the content component
 java.awt.Component getAddableComponent()
           
 java.awt.Component getContentComponent()
           
 java.awt.Color getDefaultBackgroundColor()
          the default background color for this component null = transparent.
 java.awt.Dimension getMinimumSize()
          return the minimum size for this component at zoom level 1.0
 java.awt.Component getSizableComponent()
           
 java.awt.Component getStylableComponent()
           
 void init()
           
 void setCaretPosition(int pos)
           
 void setWordWrapping(boolean wrap)
           
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingTextComponent
addFocusListener, addTextListener, changedUpdate, focusGained, focusLost, getEditable, getText, insertUpdate, notifyIncrementalChange, removeFocusListener, removeTextListener, removeUpdate, setEditable, setEnabled, setText
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
addHelpListener, createHint, getFormatter, isCaption, removeHelpListener, setBackground, setHintRecursively, setHintText, sizeComponent
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
addActionListener, addMouseListener, getComponent, getDefaultSize, getEnabled, getHeight, getPreferredSize, getSize, getStyle, getWidth, getX, getY, removeActionListener, removeMouseListener, setBounds, setDefaultSize, setFocus, setFont, setForeground, setInputMode, setStyle, setVisible, setZoom, sizeComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fi.hut.tml.xsmiles.gui.components.XText
addTextListener, getEditable, getText, removeTextListener, setEditable, setText
 
Methods inherited from interface fi.hut.tml.xsmiles.gui.components.XComponent
addActionListener, addFocusListener, addHelpListener, addMouseListener, getComponent, getEnabled, getHeight, getSize, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeHelpListener, removeMouseListener, setBackground, setBounds, setEnabled, setFocus, setForeground, setHintText, setInputMode, setStyle, setVisible, setZoom
 

Field Detail

scrollPane

public javax.swing.JScrollPane scrollPane
the Scrollpane

Constructor Detail

SwingTextArea

public SwingTextArea(java.lang.String s,
                     GUI gui)
Method Detail

init

public void init()
Overrides:
init in class SwingTextComponent

getMinimumSize

public java.awt.Dimension getMinimumSize()
return the minimum size for this component at zoom level 1.0

Overrides:
getMinimumSize in class ComponentBase

createContent

public java.awt.Component createContent()
creates the content component


setWordWrapping

public void setWordWrapping(boolean wrap)
Specified by:
setWordWrapping in interface XTextArea

getContentComponent

public java.awt.Component getContentComponent()

getAddableComponent

public java.awt.Component getAddableComponent()
Overrides:
getAddableComponent in class ComponentBase

getSizableComponent

public java.awt.Component getSizableComponent()
Overrides:
getSizableComponent in class ComponentBase

getStylableComponent

public java.awt.Component getStylableComponent()
Overrides:
getStylableComponent in class ComponentBase

getDefaultBackgroundColor

public java.awt.Color getDefaultBackgroundColor()
the default background color for this component null = transparent.

Overrides:
getDefaultBackgroundColor in class SwingTextComponent

append

public void append(java.lang.String text)
Specified by:
append in interface XTextArea

setCaretPosition

public void setCaretPosition(int pos)
Specified by:
setCaretPosition in interface XTextArea


X-Smiles 1.2