com.atlassian.gwt
Class InputField

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by com.atlassian.gwt.InputField
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasBlurHandlers, com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.dom.client.HasKeyDownHandlers, com.google.gwt.event.dom.client.HasKeyUpHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener
Direct Known Subclasses:
InputFieldWithActionOnEnter, QuickSearchInputField

public class InputField
extends com.google.gwt.user.client.ui.Composite
implements com.google.gwt.event.dom.client.HasKeyUpHandlers, com.google.gwt.event.dom.client.HasKeyDownHandlers, com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.dom.client.HasBlurHandlers

A custom Widget that combines a textbox and a label.

Author:
Agnes Ro, Ryan Ackley

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
protected  ConfluenceLabel label
           
protected  com.google.gwt.user.client.ui.FlowPanel panel
           
protected  com.google.gwt.user.client.ui.TextBox textBox
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
InputField(java.lang.String fieldName, int size)
           
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addBlurHandler(com.google.gwt.event.dom.client.BlurHandler blurHandler)
           
 com.google.gwt.event.shared.HandlerRegistration addFocusHandler(com.google.gwt.event.dom.client.FocusHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addKeyDownHandler(com.google.gwt.event.dom.client.KeyDownHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addKeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler handler)
          Adds a KeyUpHandler to the TextBox widget.
 void focus()
          Places focus on the input field.
 java.lang.String getText()
           
 com.google.gwt.user.client.ui.TextBox getTextBox()
           
 void selectAll()
           
 void setLabel(java.lang.String labelString)
          Sets the label text to the left of the input field.
 void setText(java.lang.String text)
          Sets the text inside of the TextBox's widget input field.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Field Detail

textBox

protected final com.google.gwt.user.client.ui.TextBox textBox

panel

protected final com.google.gwt.user.client.ui.FlowPanel panel

label

protected ConfluenceLabel label
Constructor Detail

InputField

@UiConstructor
public InputField(java.lang.String fieldName,
                                int size)
Parameters:
fieldName - The name of the field for the text input field.
size - The visible size of the text input field.
Method Detail

setLabel

public void setLabel(java.lang.String labelString)
Sets the label text to the left of the input field.

Parameters:
labelString - the label text.

getTextBox

public com.google.gwt.user.client.ui.TextBox getTextBox()
Returns:
the TextBox widget that is part of this composite.

getText

public java.lang.String getText()
Returns:
the text inside of the TextBox widget.

setText

public void setText(java.lang.String text)
Sets the text inside of the TextBox's widget input field.

Parameters:
text - the text to set inside of the text box.

focus

public void focus()
Places focus on the input field.


selectAll

public void selectAll()

addKeyUpHandler

public com.google.gwt.event.shared.HandlerRegistration addKeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler handler)
Adds a KeyUpHandler to the TextBox widget.

Specified by:
addKeyUpHandler in interface com.google.gwt.event.dom.client.HasKeyUpHandlers

addKeyDownHandler

public com.google.gwt.event.shared.HandlerRegistration addKeyDownHandler(com.google.gwt.event.dom.client.KeyDownHandler handler)
Specified by:
addKeyDownHandler in interface com.google.gwt.event.dom.client.HasKeyDownHandlers

addFocusHandler

public com.google.gwt.event.shared.HandlerRegistration addFocusHandler(com.google.gwt.event.dom.client.FocusHandler handler)
Specified by:
addFocusHandler in interface com.google.gwt.event.dom.client.HasFocusHandlers

addBlurHandler

public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(com.google.gwt.event.dom.client.BlurHandler blurHandler)
Specified by:
addBlurHandler in interface com.google.gwt.event.dom.client.HasBlurHandlers


Copyright © 2003-2010 Atlassian. All Rights Reserved.