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

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.SwingInput
All Implemented Interfaces:
javax.swing.event.DocumentListener, java.util.EventListener, java.awt.event.FocusListener, XComponent, XInput, XSecret, XText

public class SwingInput
extends SwingTextComponent
implements XInput, XSecret

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.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
 
Fields inherited from interface fi.hut.tml.xsmiles.gui.components.XInput
ENTER_STROKED
 
Constructor Summary
SwingInput(char passwdchar, GUI gui)
           
SwingInput(GUI gui)
           
 
Method Summary
 void addActionListener(java.awt.event.ActionListener al)
          the default background color for this component null = transparent.
 java.awt.Component createContent()
          creates the content component
 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 removeBorders()
           
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingTextComponent
addFocusListener, addTextListener, changedUpdate, focusGained, focusLost, getDefaultBackgroundColor, 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
addMouseListener, getAddableComponent, getComponent, getDefaultSize, getEnabled, getHeight, getPreferredSize, getSizableComponent, getSize, getStylableComponent, getStyle, getWidth, getX, getY, 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
addFocusListener, addHelpListener, addMouseListener, getComponent, getEnabled, getHeight, getSize, getStyle, getWidth, getX, getY, removeFocusListener, removeHelpListener, removeMouseListener, setBackground, setBounds, setEnabled, setFocus, setForeground, setHintText, setInputMode, setStyle, setVisible, setZoom
 

Field Detail

echoChar

protected char echoChar
the action for enter keypress


isSecret

protected boolean isSecret
Constructor Detail

SwingInput

public SwingInput(GUI gui)

SwingInput

public SwingInput(char passwdchar,
                  GUI gui)
Method Detail

init

public void init()
in init the subclass always creates its component first and then calls super.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


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

removeActionListener

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

removeBorders

public void removeBorders()
Specified by:
removeBorders in interface XInput


X-Smiles 1.2