|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.mdl.UIDelegateClient
at.spardat.xma.mdl.list.ListUIDelegateClient
This class is the UIDelegate for a ListWMClient widget model. It
manages the interaction between an SWT-combo or an SWT-list and the widget model.
If a Combo is to be attached, the model must not have the style IListWM.S_MULTI_SELECT.
If a List is to be attached, the model must not have the style IListWM.S_NOT_STRICT.
| Constructor Summary | |
ListUIDelegateClient(ListWMClient wModel)
Constructor |
|
| Method Summary | |
void |
attachUI(java.lang.Object control,
java.lang.Object label)
Attaches a UI library control. |
void |
detachUI()
Detaches the UI-control. |
java.lang.Object |
getUIControl()
This method returns the attached UI-control. |
java.lang.Object |
getUILabel()
Returns the label that has been provided via attachUI. |
WModel |
getWModel()
Returns the WidgetModel this UIDelegateClient is attached to. |
void |
handleModelChangeEvent(ModelChangeEvent event)
The widget model has been changed. |
void |
handleUIEvent(java.lang.Object event,
int type)
This method is responsible for accepting events originating from the UI library, creating corresponding ModelChangeEvents and updating the WidgetModels. |
boolean |
isDoPrefixSearch()
|
boolean |
isEditable()
Returns true if this model's widget may be modified by the end-user. |
boolean |
isEnabled()
Returns true, if this model's widget is enabled. |
boolean |
isPrefixSearchCaseSensitive()
|
boolean |
isUIAttached()
Yields true, if this UIDelegateClient is attached, i.e., has a Control of the UI-library associated. |
void |
resetWidgetFromModel()
Sets the widget to the current value of the model. |
void |
setDoPrefixSearch(boolean doPrefixSearch)
determine if prefix search has to be done on this model |
void |
setEditable(boolean what)
Sets the editable-state of this models's widget. |
void |
setEnabled(boolean what)
Sets the enabled-state of this model's widget. |
void |
setErrorColor(boolean inError)
If inError, this method sets the background of the corresponding Control c to the error color defined in ComponentClient. |
void |
setPrefixSearchCaseSensitive(boolean prefixSearchCaseSensitive)
determine if prefix seach has to be done case sensitive or not |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ListUIDelegateClient(ListWMClient wModel)
wModel - the widget model to use this UIDelegate with.| Method Detail |
public void handleUIEvent(java.lang.Object event,
int type)
UIDelegateClientThis method does nothing if isUIAttached() is false.
handleUIEvent in class UIDelegateClientevent - the Event-object from a particular UI libraray, e.g., SWT.type - TODOpublic void handleModelChangeEvent(ModelChangeEvent event)
UIDelegateClient
handleModelChangeEvent in class UIDelegateClientpublic WModel getWModel()
UIDelegateClient
getWModel in class UIDelegateClientpublic boolean isUIAttached()
UIDelegateClient
isUIAttached in class UIDelegateClient
public void attachUI(java.lang.Object control,
java.lang.Object label)
throws AttachmentExceptionClient
UIDelegateClient
attachUI in class UIDelegateClientcontrol - an object of the UI class library. For example, in the
case of SWT it is a SWT Widget like a Text, Label or Check Box.label - a widget of the UI class library which is the label for control.
With SWT, typically it the control is a Text field, the
label is a Label widget which usually is the widget
holding the describing text in front of the Text field. The label
is used in error messages. It may be null.
AttachmentExceptionClient - if the control cannot be attached.public void resetWidgetFromModel()
public java.lang.Object getUIControl()
UIDelegateClient
getUIControl in class UIDelegateClientpublic java.lang.Object getUILabel()
UIDelegateClient
getUILabel in class UIDelegateClientUIDelegateClient.getUILabel()public void detachUI()
UIDelegateClient
detachUI in class UIDelegateClientpublic boolean isEditable()
UIDelegateClient
isEditable in class UIDelegateClientpublic void setEditable(boolean what)
UIDelegateClientUsually, this method is called on all widget-models of a page to set the whole page to a read-only mode.
If this method is not called, the default is true.
setEditable in class UIDelegateClientwhat - true if the model's widget should be editable, false otherwise.public boolean isEnabled()
UIDelegateClient
isEnabled in class UIDelegateClientpublic void setEnabled(boolean what)
UIDelegateClient
setEnabled in class UIDelegateClientwhat - the state to set.public boolean isPrefixSearchCaseSensitive()
public void setPrefixSearchCaseSensitive(boolean prefixSearchCaseSensitive)
prefixSearchCaseSensitive - public boolean isDoPrefixSearch()
public void setDoPrefixSearch(boolean doPrefixSearch)
public void setErrorColor(boolean inError)
setErrorColor in class UIDelegateClient
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||