org.cafesip.gwtcomp.client.ui
Class DataEntryPanel

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.Panel
              extended by com.google.gwt.user.client.ui.SimplePanel
                  extended by org.cafesip.gwtcomp.client.ui.DataEntryPanel
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasWidgets, java.lang.Iterable<com.google.gwt.user.client.ui.Widget>

public class DataEntryPanel
extends com.google.gwt.user.client.ui.SimplePanel

A panel for data entry. The data entry panel allows common-styles to be applied to screens from where the user submits data. For example, the data panel may be used to create a "feedback form" where an user can enter his/her name, address, etc. The panel allows you to add a title bar, a message bar for displaying error/warning/info messages, a set of user input widgets (with label) and optionally, a set of buttons.

Examples:

CSS Style Rules:

Screen-Shots:


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
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
DataEntryPanel()
          A constructor for this class.
DataEntryPanel(TitleBar titleBar, MessageBar messageBar)
          A constructor for this class.
 
Method Summary
 void addButton(com.google.gwt.user.client.ui.Button button)
          Add a button to the button bar
 void addField(com.google.gwt.user.client.ui.Label label, com.google.gwt.user.client.ui.Widget entry)
          Same as the other addField() method - mandatory flag is set to false automatically.
 void addField(com.google.gwt.user.client.ui.Label label, com.google.gwt.user.client.ui.Widget entry, boolean required)
          Add a label and an input field.
 void addField(com.google.gwt.user.client.ui.Widget entry)
          Adds a single widget to the form layout instead of adding a label/entry.
 ButtonPanel getButtonBar()
          Returns the button bar at the bottom of the panel.
 MessageBar getMessageBar()
          Returns the message bar at the top of the panel.
 com.google.gwt.user.client.ui.FlexTable getTable()
          Returns the table that is used for laying out the data entry panel.
 TitleBar getTitleBar()
          Returns the title bar at the top of the panel.
 void setMessageBar(MessageBar messageBar)
          Sets a message bar.
 void setTitleBar(TitleBar titleBar)
          Sets a title bar.
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getContainerElement, getWidget, iterator, remove, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onAttach, onBrowserEvent, onDetach, removeFromParent
 
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, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataEntryPanel

public DataEntryPanel()
A constructor for this class.


DataEntryPanel

public DataEntryPanel(TitleBar titleBar,
                      MessageBar messageBar)
A constructor for this class.

Parameters:
titleBar - a title bar object that is displayed
messageBar - a message bar object that is displayed
Method Detail

getButtonBar

public ButtonPanel getButtonBar()
Returns the button bar at the bottom of the panel. You can get this object and add additional buttons to the button bar.

Returns:
Returns the button bar.

getMessageBar

public MessageBar getMessageBar()
Returns the message bar at the top of the panel. You can set messages on the message bar after getting the object.

Returns:
Returns the message bar - null if the bar has not been set.

setMessageBar

public void setMessageBar(MessageBar messageBar)
Sets a message bar.

Parameters:
messageBar - The message bar to set.

getTable

public com.google.gwt.user.client.ui.FlexTable getTable()
Returns the table that is used for laying out the data entry panel.

Returns:
Returns the table.

getTitleBar

public TitleBar getTitleBar()
Returns the title bar at the top of the panel. You can set title text and help URL on the title bar after getting the object.

Returns:
Returns the titleBar.

setTitleBar

public void setTitleBar(TitleBar titleBar)
Sets a title bar.

Parameters:
titleBar - The title bar to set.

addButton

public void addButton(com.google.gwt.user.client.ui.Button button)
Add a button to the button bar

Parameters:
button - button to add.

addField

public void addField(com.google.gwt.user.client.ui.Label label,
                     com.google.gwt.user.client.ui.Widget entry,
                     boolean required)
Add a label and an input field.

Parameters:
label - label for the input field.
entry - the input field.
required - true if the parameter entry is mandatory.

addField

public void addField(com.google.gwt.user.client.ui.Label label,
                     com.google.gwt.user.client.ui.Widget entry)
Same as the other addField() method - mandatory flag is set to false automatically.

Parameters:
label -
entry -

addField

public void addField(com.google.gwt.user.client.ui.Widget entry)
Adds a single widget to the form layout instead of adding a label/entry.

Parameters:
entry - the widget that is to be added.


http://www.cafesip.org