fi.hut.tml.xsmiles.gui.components.havi
Class HaviInput

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.general.ComponentBase
      extended byfi.hut.tml.xsmiles.gui.components.havi.HaviStylableComponent
          extended byfi.hut.tml.xsmiles.gui.components.havi.HaviTextComponent
              extended byfi.hut.tml.xsmiles.gui.components.havi.HaviInput
All Implemented Interfaces:
java.util.EventListener, org.ftv.ui.event.HTextListener, XComponent, XInput, XSecret, XText, XTextArea
Direct Known Subclasses:
HaviTextArea

public class HaviInput
extends HaviTextComponent
implements XInput, XSecret, org.ftv.ui.event.HTextListener, XTextArea

textinput line this is extended from SwingComponent, which will add captions and styling etc

Author:
Mikko Honkala, Juha Vierinen

Field Summary
protected  char echoChar
          the action for enter keypress
protected  boolean isSecret
           
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.havi.HaviTextComponent
fText, insideChangeEvent, textcomponent
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
content, currentFont, currentZoom, defaultBGColor, defaultFont, defaultSize, fInputMode, hintText, style
 
Fields inherited from interface fi.hut.tml.xsmiles.gui.components.XInput
ENTER_STROKED
 
Constructor Summary
HaviInput()
           
HaviInput(char passwdchar, GUI gui)
           
 
Method Summary
 void addActionListener(java.awt.event.ActionListener al)
          the default background color for this component null = transparent.
 void append(java.lang.String arg0)
           
 void caretMoved(org.ftv.ui.event.HTextEvent e)
           
 java.awt.Component createContent()
          creates the content component
 java.awt.Color getDefaultBackgroundColor()
          the default background color for this type of component null = transparent.
 java.awt.Dimension getMinimumSize()
          return the minimum size for this component at zoom level 1.0
 java.lang.String getPassword()
           
 void init()
          in init the subclass always creates its component first and then calls super.init
 void removeActionListener(java.awt.event.ActionListener al)
           
 void setCaretPosition(int arg0)
           
 void setEnabled(boolean b)
           
 void setWordWrapping(boolean wrap)
           
 void textChanged(org.ftv.ui.event.HTextEvent e)
           
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.havi.HaviTextComponent
addFocusListener, addTextListener, focusGained, focusLost, getEditable, getText, removeFocusListener, removeTextListener, setEditable, setText
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.havi.HaviStylableComponent
setBackground
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
addHelpListener, addMouseListener, getAddableComponent, getComponent, getDefaultSize, getEnabled, getFormatter, getHeight, getPreferredSize, getSizableComponent, getSize, getStylableComponent, getStyle, getWidth, getX, getY, removeHelpListener, removeMouseListener, setBounds, setDefaultSize, setFocus, setFont, setForeground, setHintText, setInputMode, setStyle, setVisible, setZoom, sizeComponent, 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.XInput
removeBorders
 
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
addFocusListener, addHelpListener, addMouseListener, getComponent, getEnabled, getHeight, getSize, getStyle, getWidth, getX, getY, removeFocusListener, removeHelpListener, removeMouseListener, setBackground, setBounds, setFocus, setForeground, setHintText, setInputMode, setStyle, setVisible, setZoom
 

Field Detail

echoChar

protected char echoChar
the action for enter keypress


isSecret

protected boolean isSecret
Constructor Detail

HaviInput

public HaviInput()

HaviInput

public HaviInput(char passwdchar,
                 GUI gui)
Method Detail

init

public void init()
in init the subclass always creates its component first and then calls super.init


getMinimumSize

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

Overrides:
getMinimumSize in class ComponentBase

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 HaviTextComponent

createContent

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


getPassword

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

addActionListener

public void addActionListener(java.awt.event.ActionListener al)
the default background color for this component null = transparent.

Specified by:
addActionListener in interface XComponent
Overrides:
addActionListener in class ComponentBase

setEnabled

public void setEnabled(boolean b)
Specified by:
setEnabled in interface XComponent
Overrides:
setEnabled in class ComponentBase
Parameters:
b - Active or not active

removeActionListener

public void removeActionListener(java.awt.event.ActionListener al)
Specified by:
removeActionListener in interface XComponent
Overrides:
removeActionListener in class ComponentBase

caretMoved

public void caretMoved(org.ftv.ui.event.HTextEvent e)
Specified by:
caretMoved in interface org.ftv.ui.event.HTextListener

textChanged

public void textChanged(org.ftv.ui.event.HTextEvent e)
Specified by:
textChanged in interface org.ftv.ui.event.HTextListener

setWordWrapping

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

append

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

setCaretPosition

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


X-Smiles 1.2