GWTApplication.client
Class LabelTextBox

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 GWTApplication.client.LabelTextBox
All Implemented Interfaces:
com.google.gwt.user.client.EventListener

 class LabelTextBox
extends com.google.gwt.user.client.ui.Composite

This is a composite Widget which is comprised of a label and a text box into which the user can enter free-format text. I have purposefully allowed the caller to access the widgets in order to simplify the creation of the class.

Version:
$Id: LabelTextBox.java,v 1.4 2007/12/17 10:34:13 cb Exp $
Author:
Craige Bevil

Field Summary
(package private)  com.google.gwt.user.client.ui.CellPanel containerPanel
          This is the container panel
static int HORIZONTAL
          This static is used to indicate that the label and the text box should be packed in a horizontal manner
 com.google.gwt.user.client.ui.Label label
          This is the label widget which is associated with the text box
 com.google.gwt.user.client.ui.TextBox textBox
          This is the text box widget which is used To enter free-form text into.
static int VERTICAL
          This static is used to indicate that the label and the text box should be packed in a vertical manner
 
Constructor Summary
LabelTextBox(int Orientation)
          This is the constructor for the class
 
Method Summary
 void setFocus(boolean focusState)
          Allows the user to set the focus
 void setWidth(java.lang.String width)
          Allows the user to set the with of the containing panel which contains the subwidgets
 void setWidth(java.lang.String labelWidth, java.lang.String textBoxWidth)
          This is a convenience method which allows the caller to set the width of both the label and the text box simultaneously.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getElement, getWidget, initWidget, isAttached, onAttach, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
doAttachChildren, doDetachChildren, getParent, onBrowserEvent, onLoad, onUnload, removeFromParent, setElement
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

containerPanel

com.google.gwt.user.client.ui.CellPanel containerPanel
This is the container panel


HORIZONTAL

public static final int HORIZONTAL
This static is used to indicate that the label and the text box should be packed in a horizontal manner

See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
This static is used to indicate that the label and the text box should be packed in a vertical manner

See Also:
Constant Field Values

textBox

public com.google.gwt.user.client.ui.TextBox textBox
This is the text box widget which is used To enter free-form text into.


label

public com.google.gwt.user.client.ui.Label label
This is the label widget which is associated with the text box

Constructor Detail

LabelTextBox

LabelTextBox(int Orientation)
This is the constructor for the class

Parameters:
Orientation - This should be one of the above statics VERTICAL or HORIZONTAL
Method Detail

setWidth

public void setWidth(java.lang.String labelWidth,
                     java.lang.String textBoxWidth)
This is a convenience method which allows the caller to set the width of both the label and the text box simultaneously.

Parameters:
labelWidth - this is the expected width of the label and should be specified in a valid CSS unit.
textBoxWidth - this is the expected width of the text box and should be specified in a valid CSS unit.

setWidth

public void setWidth(java.lang.String width)
Allows the user to set the with of the containing panel which contains the subwidgets

Overrides:
setWidth in class com.google.gwt.user.client.ui.UIObject
Parameters:
width - This is the width of the panel

setFocus

public void setFocus(boolean focusState)
Allows the user to set the focus

Parameters:
focusState - Sets the focus on this widget