org.apache.click.extras.control
Class VirtualKeyboard

java.lang.Object
  extended by org.apache.click.control.AbstractControl
      extended by org.apache.click.control.Field
          extended by org.apache.click.control.TextField
              extended by org.apache.click.extras.control.VirtualKeyboard
All Implemented Interfaces:
Serializable, Control, Stateful

public class VirtualKeyboard
extends TextField

Provides a graphical Virtual Keyboard interface text field control:   <input type='text'>.

VirtualKeyboard enables text fields to be filled in using a mouse only. Password and textarea fields will be supported in later releases.

Virtual keyboard interfaces are generally used in websites where the highest level of security is a must like online banking applications. Virtual keyboards help to prevent any keylogging activities and/or provide users a special keyboard which they don't already have (like a keyboard of another language).

Keyboard Layout Support

This controls comes with support for Arabic, Belgian, Dutch, Dvorak, French, German, Greek, Hebrew, Hungarian, Italian, Lithuanian, Norwegian, Number Pad, Polish Programmers, Portuguese, Russian, Slovenian, Spanish (Spain), Turkish-F, Turkish-QWERTY, UK, US Standard and US International keyboard layouts, dynamically selectable.

CSS and JavaScript resources

The VirtualKeyboard control makes use of the following resources (which Click automatically deploys to the application directory, /click): To import these VirtualKeyboard files simply reference the variables $headElements and $jsElements in the page template.

Credits

This control based on the Greywyvern JavaScript library.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.click.control.TextField
maxLength, minLength, size, VALIDATE_TEXTFIELD_FUNCTION
 
Fields inherited from class org.apache.click.control.Field
disabled, error, focus, form, help, label, labelStyle, labelStyleClass, parentStyleClassHint, parentStyleHint, readonly, required, tabindex, title, trim, validate, value
 
Fields inherited from class org.apache.click.control.AbstractControl
actionListener, attributes, behaviors, headElements, listener, listenerMethod, messages, name, parent, styles
 
Fields inherited from interface org.apache.click.Control
CONTROL_MESSAGES
 
Constructor Summary
VirtualKeyboard()
          Constructs a new VirtualKeyboard Field object with no name defined.
VirtualKeyboard(String name)
          Constructs the VirtualKeyboard Field with the given name.
VirtualKeyboard(String name, String label)
          Constructs the VirtualKeyboard Field with the given name and label.
 
Method Summary
 List<Element> getHeadElements()
          Return the VirtualKeyboard HTML HEAD elements for the following resources:

click/keyboard.css click/keyboard.js click/keyboard.png

 
Methods inherited from class org.apache.click.control.TextField
getControlSizeEst, getMaxLength, getMinLength, getSize, getTag, getType, getValidationJavaScript, render, setMaxLength, setMinLength, setSize, validate
 
Methods inherited from class org.apache.click.control.Field
bindRequestValue, getError, getErrorLabel, getFocus, getFocusJavaScript, getForm, getHelp, getId, getLabel, getLabelStyle, getLabelStyleClass, getParentStyleClassHint, getParentStyleHint, getRequestValue, getState, getTabIndex, getTextAlign, getTitle, getValidate, getValue, getValueObject, getWidth, isDisabled, isHidden, isReadonly, isRequired, isTrim, isValid, onProcess, removeState, renderTagBegin, restoreState, saveState, setDisabled, setError, setErrorMessage, setErrorMessage, setFocus, setForm, setHelp, setLabel, setLabelStyle, setLabelStyleClass, setListener, setParent, setParentStyleClassHint, setParentStyleHint, setReadonly, setRequired, setState, setTabIndex, setTextAlign, setTitle, setTrim, setValidate, setValue, setValueObject, setWidth
 
Methods inherited from class org.apache.click.control.AbstractControl
addBehavior, addStyleClass, appendAttributes, dispatchActionEvent, getActionListener, getAttribute, getAttributes, getBehaviors, getContext, getHtmlImports, getMessage, getMessage, getMessages, getName, getPage, getParent, getStyle, getStyles, hasAttribute, hasAttributes, hasBehaviors, hasStyles, isAjaxTarget, onDeploy, onDestroy, onInit, onRender, removeBehavior, removeStyleClass, renderTagEnd, setActionListener, setAttribute, setId, setName, setStyle, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VirtualKeyboard

public VirtualKeyboard()
Constructs a new VirtualKeyboard Field object with no name defined.

Please note the control's name must be defined before it is valid.


VirtualKeyboard

public VirtualKeyboard(String name)
Constructs the VirtualKeyboard Field with the given name.

Parameters:
name - the name of the VirtualKeyboard field

VirtualKeyboard

public VirtualKeyboard(String name,
                       String label)
Constructs the VirtualKeyboard Field with the given name and label.

Parameters:
name - the name of the VirtualKeyboard field
label - the label of the VirtualKeyboard field
Method Detail

getHeadElements

public List<Element> getHeadElements()
Return the VirtualKeyboard HTML HEAD elements for the following resources:

Specified by:
getHeadElements in interface Control
Overrides:
getHeadElements in class AbstractControl
Returns:
the HTML HEAD elements for the control
See Also:
Control.getHeadElements()