java.lang.Object
com.voytechs.html.component.Component
com.voytechs.html.component.DispatchableComponent
com.voytechs.html.component.FormComponent
com.voytechs.html.component.FormTextField
- All Implemented Interfaces:
- com.voytechs.html.event.ListenerIf, com.voytechs.html.event.TextListenerIf
- public class FormTextField
- extends FormComponent
- implements com.voytechs.html.event.TextListenerIf
A FormTextField button.
| Methods inherited from class com.voytechs.html.component.Component |
areFlagsSet, clearFlags, getParent, getRootFrame, getUriPath, setFlags, setParent, show, show, toStringPrefix, toStringPrefixCap, toStringPrefixTee, toStringTree |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormTextField
public FormTextField(java.lang.String defaultValue)
throws com.voytechs.html.event.EventException
- Creates a submit button.
paint
public void paint(com.voytechs.html.io.HtmlWriter htmlOut)
throws java.io.IOException
- Output text to the HtmlWriter.
- Specified by:
paint in class Component
setValue
public void setValue(java.lang.String value)
- Set the text of the object.
getValue
public java.lang.String getValue()
- Get the text of this object.
addTextListener
public void addTextListener(com.voytechs.html.event.TextListenerIf listener,
java.lang.Object data)
throws com.voytechs.html.event.EventException
- Add a text change listener. Dispatched when the button is pressed on the HTML form and the text
field's value changed.
processEvent
public void processEvent(com.voytechs.html.event.HtmlTextEvent event,
java.lang.Object userData)
- We listen to our own events so that we can update our state to match that
on the HTML form.
- Specified by:
processEvent in interface com.voytechs.html.event.TextListenerIf
main
public static void main(java.lang.String[] args)
- Test function for FormTextField