fi.hut.tml.xsmiles.gui.components.awt
Class AWTTextComponent

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.general.ComponentBase
      extended byfi.hut.tml.xsmiles.gui.components.awt.AWTStylableComponent
          extended byfi.hut.tml.xsmiles.gui.components.awt.AWTTextComponent
All Implemented Interfaces:
java.util.EventListener, java.awt.event.FocusListener, XComponent, XText
Direct Known Subclasses:
AWTInput

public abstract class AWTTextComponent
extends AWTStylableComponent
implements XText, java.awt.event.FocusListener

Common base class for text components

Author:
Mikko Honkala, AWT mod juha

Field Summary
protected  GUI fGUI
           
protected  boolean insideChangeEvent
           
protected  java.awt.TextComponent textcomponent
           
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.awt.AWTStylableComponent
hiddenFrame
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
content, currentFont, currentZoom, defaultBGColor, defaultFont, defaultSize, fInputMode, hintText, minSize, style
 
Constructor Summary
AWTTextComponent(GUI gui)
           
 
Method Summary
 void addFocusListener(java.awt.event.FocusListener fl)
           
 void addTextListener(java.awt.event.TextListener tl)
          Adds the specified text event listener to receive text events from this text component.
 void focusGained(java.awt.event.FocusEvent ae)
           
 void focusLost(java.awt.event.FocusEvent ae)
           
 java.awt.Color getDefaultBackgroundColor()
          the default background color for this type of component null = transparent.
 boolean getEditable()
           
 java.lang.String getText()
           
 void init()
           
 void removeFocusListener(java.awt.event.FocusListener fl)
           
 void removeTextListener(java.awt.event.TextListener tl)
           
 void setEditable(boolean editable)
           
 void setText(java.lang.String text)
           @param s The text is set to s
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.awt.AWTStylableComponent
addHelpListener, createHint, getHiddenFrame, getPreferredSize, isCaption, removeHelpListener, setBackground, setHintRecursively, setHintText, sizeComponent
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
addActionListener, addMouseListener, getAddableComponent, getComponent, getDefaultSize, getEnabled, getFormatter, getHeight, getMinimumSize, getSizableComponent, getSize, getStylableComponent, getStyle, getWidth, getX, getY, removeActionListener, removeMouseListener, setBounds, setDefaultSize, setEnabled, 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.XComponent
addActionListener, addHelpListener, addMouseListener, getComponent, getEnabled, getHeight, getSize, getStyle, getWidth, getX, getY, removeActionListener, removeHelpListener, removeMouseListener, setBackground, setBounds, setEnabled, setFocus, setForeground, setHintText, setInputMode, setStyle, setVisible, setZoom
 

Field Detail

textcomponent

protected java.awt.TextComponent textcomponent

fGUI

protected GUI fGUI

insideChangeEvent

protected boolean insideChangeEvent
Constructor Detail

AWTTextComponent

public AWTTextComponent(GUI gui)
Method Detail

init

public void init()
Overrides:
init in class AWTStylableComponent

setText

public void setText(java.lang.String text)
Description copied from interface: XText
 @param s The text is set to s

Specified by:
setText in interface XText

getText

public java.lang.String getText()
Specified by:
getText in interface XText
Returns:
Return the password currently typed in.

addTextListener

public void addTextListener(java.awt.event.TextListener tl)
Description copied from interface: XText
Adds the specified text event listener to receive text events from this text component. If l is null, no exception is thrown and no action is performed.

Specified by:
addTextListener in interface XText

removeTextListener

public void removeTextListener(java.awt.event.TextListener tl)
Specified by:
removeTextListener in interface XText

getDefaultBackgroundColor

public java.awt.Color getDefaultBackgroundColor()
Description copied from class: ComponentBase
the default background color for this type of component null = transparent.

Overrides:
getDefaultBackgroundColor in class ComponentBase

setEditable

public void setEditable(boolean editable)
Specified by:
setEditable in interface XText

getEditable

public boolean getEditable()
Specified by:
getEditable in interface XText

focusGained

public void focusGained(java.awt.event.FocusEvent ae)
Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent ae)
Specified by:
focusLost in interface java.awt.event.FocusListener

addFocusListener

public void addFocusListener(java.awt.event.FocusListener fl)
Specified by:
addFocusListener in interface XComponent
Overrides:
addFocusListener in class ComponentBase

removeFocusListener

public void removeFocusListener(java.awt.event.FocusListener fl)
Specified by:
removeFocusListener in interface XComponent
Overrides:
removeFocusListener in class ComponentBase


X-Smiles 1.2