net.pleso.framework.client.ui.custom.controls
Class FormItemsWidget

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 net.pleso.framework.client.ui.custom.controls.FormItemsWidget
All Implemented Interfaces:
com.google.gwt.user.client.EventListener

public class FormItemsWidget
extends com.google.gwt.user.client.ui.Composite

Represents composite widget (grid) that works with IFormItem instances array. Builds corresponding data controls in itself. Grid has two columns and number of rows that equal length of IFormItem instances array. In the left column - form item caption. In the right cell - corresponding data control.

CSS Style Rules


Constructor Summary
FormItemsWidget(IWindow parentWindow, IUpdateControlListener updateControlListenerer, com.google.gwt.user.client.ui.KeyboardListener keyboardListener, com.google.gwt.user.client.ui.Panel slidersPanel)
          Constructs empty FormItemsWidget.
 
Method Summary
 boolean focusOnFirstControl()
          Makes first IFocusControl controls in all controlls list to be focused.
 void hideSlidersWindows()
          Hides all windows in child sliders.
 void initFormControls(IFormItem[] items, IDataRow dataRow)
          Inits widget whith IFormItemsGroup and IDataRow.
 boolean isValid()
          Returns validation success result.
 void reReadBindableControls()
          Forces bindable controls to read binded data.
 void updateData()
          Updates binded #dataRow by values from all controls.
 void validate()
          Make validation on all controls.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getElement
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onBrowserEvent, removeFromParent
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleName, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, isVisible, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormItemsWidget

public FormItemsWidget(IWindow parentWindow,
                       IUpdateControlListener updateControlListenerer,
                       com.google.gwt.user.client.ui.KeyboardListener keyboardListener,
                       com.google.gwt.user.client.ui.Panel slidersPanel)
Constructs empty FormItemsWidget.

Parameters:
parentWindow - parent IWindow
updateControlListenerer - a IUpdateControlListener instance
keyboardListener - a KeyboardListener instance
slidersPanel - a Panel where sliders should be placed
Method Detail

initFormControls

public void initFormControls(IFormItem[] items,
                             IDataRow dataRow)
Inits widget whith IFormItemsGroup and IDataRow.

Parameters:
formItemsGroup - a IFormItemsGroup instance
dataRow - a IDataRow instance

validate

public void validate()
Make validation on all controls.


isValid

public boolean isValid()
Returns validation success result.

Returns:
true if all form controls' values are valid

hideSlidersWindows

public void hideSlidersWindows()
Hides all windows in child sliders.


reReadBindableControls

public void reReadBindableControls()
Forces bindable controls to read binded data.


updateData

public void updateData()
Updates binded #dataRow by values from all controls.


focusOnFirstControl

public boolean focusOnFirstControl()
Makes first IFocusControl controls in all controlls list to be focused.

Returns:
true if some control was focused


Copyright © 2006-2007 pleso.net crew All Rights Reserved.