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

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.SelectorControl
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.ClickListener, com.google.gwt.user.client.ui.SourcesKeyboardEvents, HideWindowListener, IBindableDataControl, IEditableDataControl, IFocusControl

public class SelectorControl
extends com.google.gwt.user.client.ui.Composite
implements com.google.gwt.user.client.ui.ClickListener, HideWindowListener, IEditableDataControl, IFocusControl

Selector data control. In this control user choose value from external reference book (f.e. by foreigh key). Contains text box and button "Select" (button "Clear" optionally for null values)

CSS Style Rules


Constructor Summary
SelectorControl(IWindow parentWindow, ISelector selector)
           
 
Method Summary
 void addKeyboardListener(com.google.gwt.user.client.ui.KeyboardListener listener)
           
 void bind(IDataRow row, IDataColumn column)
          Bind row and range columns
 boolean isRequired()
          Gets required status for value in data control.
 boolean isValid()
          Determines whether control value is valid after IEditableDataControl.validate() calling.
 void onClick(com.google.gwt.user.client.ui.Widget sender)
           
 void onHideWindow(IWindow sender)
          Fired when the window has been hidden.
 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

SelectorControl

public SelectorControl(IWindow parentWindow,
                       ISelector selector)
Parameters:
parentWindow -
selector -
Method Detail

onClick

public void onClick(com.google.gwt.user.client.ui.Widget sender)
Specified by:
onClick in interface com.google.gwt.user.client.ui.ClickListener

onHideWindow

public void onHideWindow(IWindow sender)
Description copied from interface: HideWindowListener
Fired when the window has been hidden.

Specified by:
onHideWindow in interface HideWindowListener
Parameters:
sender - the IWindow has been hidden

bind

public void bind(IDataRow row,
                 IDataColumn column)
Bind row and range columns

Parameters:
row - row instance
start_column - column instance
end_column - column instance

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

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

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


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