com.groiss.gui.component
Class Textfield

java.lang.Object
  extended by com.groiss.gui.AbstractComponent
      extended by com.groiss.gui.component.Textfield
All Implemented Interfaces:
Component, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
HiddenField, PasswordField

public class Textfield
extends AbstractComponent

Textfield component is used for a single line text entry fields. it should be used in conjunction with the SIZE and MAXLENGTH attributes to set the maximum amount of text that can be entered.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.groiss.gui.AbstractComponent
actions, ACTIVE, browserMode, DEFAULT, ID, IE, INVISIBLE, isSensitive, label, NS, ON_BLUR, ON_CHANGE, ON_CLICK, ON_DBLCLICK, ON_FOCUS, ON_KEY_DOWN, ON_KEY_PRESS, ON_KEY_UP, ON_LOAD, ON_MOUSE_DOWN, ON_MOUSE_MOVE, ON_MOUSE_OUT, ON_MOUSE_UP, ON_RESET, ON_SELECT, ON_SUBMIT, ON_UNLOAD, outputter, parent, parentElem, READONLY, root, viewMode
 
Constructor Summary
Textfield()
          Constructs a new empty textfield component.
Textfield(java.lang.String name)
           
Textfield(java.lang.String name, int size)
           
Textfield(java.lang.String name, int size, boolean enabled)
           
Textfield(java.lang.String name, java.lang.String value)
          Constructor with name and value.
Textfield(java.lang.String name, java.lang.String value, int maxlength, int size)
          Constructor with name, value maxlength and size
Textfield(java.lang.String name, java.lang.String value, java.lang.String styleClass)
          Constructor with name and value.
 
Method Summary
 java.lang.Object getContent()
          Get the value.
 int getMaxlength()
           
 int getSize()
           
 java.lang.String getValue()
           
 void setContent(java.lang.Object o)
          Set the value attribute.
 void setMaxlength(int length)
          sets the maximum length of the text in the textfield
 void setSize(int size)
          sets the size of the textfield
 void setValue(java.lang.String value)
          sets the initial displayed value of the field
 
Methods inherited from class com.groiss.gui.AbstractComponent
clone, create, getActionListener, getAttribute, getBrowserMode, getId, getLabel, getName, getParent, getParentElement, getRoot, getRootName, getStyle, getViewMode, init, init, init, removeAttribute, setActionListener, setAttribute, setBrowserMode, setEncoding, setExpandEmptyElements, setId, setIndenting, setLabel, setName, setNewLines, setParent, setParentElement, setRootName, setStyle, setViewMode, show, show, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Textfield

public Textfield()
Constructs a new empty textfield component.


Textfield

public Textfield(java.lang.String name)

Textfield

public Textfield(java.lang.String name,
                 int size)

Textfield

public Textfield(java.lang.String name,
                 int size,
                 boolean enabled)

Textfield

public Textfield(java.lang.String name,
                 java.lang.String value)
Constructor with name and value.

Parameters:
name - the group where the field belongs to
value - the value of the field

Textfield

public Textfield(java.lang.String name,
                 java.lang.String value,
                 java.lang.String styleClass)
Constructor with name and value.

Parameters:
name - the group where the field belongs to
value - the value of the field
styleClass - the name of a CSS class

Textfield

public Textfield(java.lang.String name,
                 java.lang.String value,
                 int maxlength,
                 int size)
Constructor with name, value maxlength and size

Parameters:
name - the group where the text field belongs to
value - the value of the text field
maxlength - the maximum length of the content
size - the size of the field
Method Detail

setMaxlength

public void setMaxlength(int length)
sets the maximum length of the text in the textfield

Parameters:
length - - the maximum length

getMaxlength

public int getMaxlength()

setSize

public void setSize(int size)
sets the size of the textfield

Parameters:
size - - the size of the input field

getSize

public int getSize()

setValue

public void setValue(java.lang.String value)
sets the initial displayed value of the field

Parameters:
value - - the value

getValue

public java.lang.String getValue()

setContent

public void setContent(java.lang.Object o)
Set the value attribute.

Specified by:
setContent in interface Component
Overrides:
setContent in class AbstractComponent
Parameters:
o - any object where the string representation is used for rendering

getContent

public java.lang.Object getContent()
Get the value.

Specified by:
getContent in interface Component
Overrides:
getContent in class AbstractComponent
Returns:
the value attribute


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.