|
||||||||||
| 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.ListDomUIDelegateClient
This class is the UIDelegate for a ListDomWMClient widget model. It manages the interaction between a SWT-DROP_DOWN-combo and the widget model. The attached Combo must be created with the style SWT.DROP_DOWN. The style SWT.READ_ONLY must not be set.
Technical footnote#1: A Combo that is not read-only has two states: its text (in the text field) and the selectionIndex of the drop-down-list. If the selectionIndex is set (differs from -1), the text-field is displayed with selected contents if the shell is resized in the current version of SWT. Therefore, this class never sets the selectionIndex, but just the text. On loose-focus, a selection index, if any, is cleared and the text is set.
| Constructor Summary | |
ListDomUIDelegateClient(ListDomWMClient 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)
The following events must be notified from the SWT combo box: SelectionEvent ModifyEvent FocusEvent for lost focus |
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 |
isUIAttached()
Yields true, if this UIDelegateClient is attached, i.e., has a Control of the UI-library associated. |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ListDomUIDelegateClient(ListDomWMClient wModel)
| Method Detail |
public void handleUIEvent(java.lang.Object event,
int type)
handleUIEvent in class UIDelegateClientevent - the Event-object from a particular UI libraray, e.g., SWT.type - TODOUIDelegateClient.handleUIEvent(java.lang.Object, int)public void handleModelChangeEvent(ModelChangeEvent event)
UIDelegateClient
handleModelChangeEvent in class UIDelegateClientUIDelegateClient.handleModelChangeEvent(at.spardat.xma.mdl.ModelChangeEvent)public WModel getWModel()
UIDelegateClient
getWModel in class UIDelegateClientUIDelegateClient.getWModel()public boolean isUIAttached()
UIDelegateClient
isUIAttached in class UIDelegateClientUIDelegateClient.isUIAttached()
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.UIDelegateClient.attachUI(java.lang.Object, java.lang.Object)public java.lang.Object getUIControl()
UIDelegateClient
getUIControl in class UIDelegateClientUIDelegateClient.getUIControl()public java.lang.Object getUILabel()
UIDelegateClient
getUILabel in class UIDelegateClientUIDelegateClient.getUILabel()public void detachUI()
UIDelegateClient
detachUI in class UIDelegateClientUIDelegateClient.detachUI()public void setErrorColor(boolean inError)
setErrorColor in class UIDelegateClientpublic boolean isEnabled()
UIDelegateClient
isEnabled in class UIDelegateClientUIDelegateClient.isEnabled()public void setEnabled(boolean what)
UIDelegateClient
setEnabled in class UIDelegateClientwhat - the state to set.UIDelegateClient.setEnabled(boolean)public boolean isEditable()
UIDelegateClient
isEditable in class UIDelegateClientUIDelegateClient.isEditable()public 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.UIDelegateClient.setEditable(boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||