net.pleso.framework.client.ui.custom.controls.data
Class TextAreaDataControl

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.data.TextAreaDataControl
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.KeyboardListener, com.google.gwt.user.client.ui.SourcesKeyboardEvents, IBindableDataControl, IEditableDataControl, IFocusControl, ISingleColumnBind

public class TextAreaDataControl
extends com.google.gwt.user.client.ui.Composite
implements IEditableDataControl, ISingleColumnBind, IFocusControl, com.google.gwt.user.client.ui.KeyboardListener

Data control with text area for multi-line text values

CSS Style Rules


Field Summary
 
Fields inherited from interface com.google.gwt.user.client.ui.KeyboardListener
KEY_ALT, KEY_BACKSPACE, KEY_CTRL, KEY_DELETE, KEY_DOWN, KEY_END, KEY_ENTER, KEY_ESCAPE, KEY_HOME, KEY_LEFT, KEY_PAGEDOWN, KEY_PAGEUP, KEY_RIGHT, KEY_SHIFT, KEY_TAB, KEY_UP, MODIFIER_ALT, MODIFIER_CTRL, MODIFIER_META, MODIFIER_SHIFT
 
Constructor Summary
TextAreaDataControl(int rowsCount)
          Constructs not binded text area data control.
 
Method Summary
 void addKeyboardListener(com.google.gwt.user.client.ui.KeyboardListener listener)
           
 void bind(IDataRow row, IDataColumn column)
          Binds control to the specified IDataRow and IDataColumn.
 boolean isRequired()
          Gets required status for value in data control.
 boolean isValid()
          Determines whether control value is valid after IEditableDataControl.validate() calling.
 void onKeyDown(com.google.gwt.user.client.ui.Widget sender, char keyCode, int modifiers)
           
 void onKeyPress(com.google.gwt.user.client.ui.Widget sender, char keyCode, int modifiers)
           
 void onKeyUp(com.google.gwt.user.client.ui.Widget sender, char keyCode, int modifiers)
           
 void readData()
          Ask control to read data from binded row and column and show it to user.
 void removeKeyboardListener(com.google.gwt.user.client.ui.KeyboardListener listener)
           
 void setFocus(boolean focused)
          Sets focus to the control.
 void setRequired(boolean required)
          Sets required status for value in data control.
 void updateData()
          Updates binded data by entered by user value.
 void validate()
          Validates data in control.
 
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

TextAreaDataControl

public TextAreaDataControl(int rowsCount)
Constructs not binded text area data control.

Parameters:
rowsCount - count of rows in TextArea widget
Method Detail

bind

public void bind(IDataRow row,
                 IDataColumn column)
Description copied from interface: ISingleColumnBind
Binds control to the specified IDataRow and IDataColumn.

Specified by:
bind in interface ISingleColumnBind
Parameters:
row - a IDataRow to be binded to.
column - a IDataColumn to be binded to.

readData

public void readData()
Description copied from interface: IBindableDataControl
Ask control to read data from binded row and column and show it to user.

Specified by:
readData in interface IBindableDataControl

updateData

public void updateData()
Description copied from interface: IEditableDataControl
Updates binded data by entered by user value.

Specified by:
updateData in interface IEditableDataControl

isValid

public boolean isValid()
Description copied from interface: IEditableDataControl
Determines whether control value is valid after IEditableDataControl.validate() calling.

Specified by:
isValid in interface IEditableDataControl
Returns:
is value in control valid

validate

public void validate()
Description copied from interface: IEditableDataControl
Validates data in control. Verifies user-specified value for correctness (f.e. correct date, time, number, etc.). Checks if user entered required value. If value is not valid control can show corresponding message. After calling IEditableDataControl.validate() outside code can call IEditableDataControl.isValid() to check whether validation was successful.

Specified by:
validate in interface IEditableDataControl

isRequired

public boolean isRequired()
Description copied from interface: IEditableDataControl
Gets required status for value in data control.

Specified by:
isRequired in interface IEditableDataControl
Returns:
required status (is value required)

setRequired

public void setRequired(boolean required)
Description copied from interface: IEditableDataControl
Sets required status for value in data control.

Specified by:
setRequired in interface IEditableDataControl
Parameters:
required - required status (is value required)

setFocus

public void setFocus(boolean focused)
Description copied from interface: IFocusControl
Sets focus to the control.

Specified by:
setFocus in interface IFocusControl
Parameters:
focused - focus status (is control focused).

addKeyboardListener

public void addKeyboardListener(com.google.gwt.user.client.ui.KeyboardListener listener)
Specified by:
addKeyboardListener in interface com.google.gwt.user.client.ui.SourcesKeyboardEvents

removeKeyboardListener

public void removeKeyboardListener(com.google.gwt.user.client.ui.KeyboardListener listener)
Specified by:
removeKeyboardListener in interface com.google.gwt.user.client.ui.SourcesKeyboardEvents

onKeyDown

public void onKeyDown(com.google.gwt.user.client.ui.Widget sender,
                      char keyCode,
                      int modifiers)
Specified by:
onKeyDown in interface com.google.gwt.user.client.ui.KeyboardListener

onKeyPress

public void onKeyPress(com.google.gwt.user.client.ui.Widget sender,
                       char keyCode,
                       int modifiers)
Specified by:
onKeyPress in interface com.google.gwt.user.client.ui.KeyboardListener

onKeyUp

public void onKeyUp(com.google.gwt.user.client.ui.Widget sender,
                    char keyCode,
                    int modifiers)
Specified by:
onKeyUp in interface com.google.gwt.user.client.ui.KeyboardListener


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