Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] Do we need a MessageBoxRidget?

Title: Re: [riena-dev] Do we need a MessageBoxRidget?
Carsten,

In generell i think we need a Ridget for such Message UI-Control preventing to use SWT API within the ViewController.

Currently, I’m not sure what is the best way. But I give some hints

Do we need support for both the MessageBox and MessageDialog too?
Which is the more practicable and flexible and fits better to the Riena MVC e.g. changing properties after binding...

Alexander

Alexander

Am 12.06.08 11:06 schrieb "Carsten Drossel" unter <Carsten.Drossel@xxxxxxxxxxxx>:

Hi everybody!
 
Should there be a Ridget that allows to show standard messages like information->ok or question->yes/no? A Ridget delegates to an actual UI-widget but offers a higher level of abstraction and is independent of the UI-toolkit (SWT). A MessageBoxRidget could delegate to a org.eclipse.swt.widgets.MessageBox or a org.eclipse.jface.dialogs.MessageDialog.
 
Problem
The SWT-widgets MessageBox and MessageDialog are different from the widgets usually bound to Ridgets insofar as they appear only when needed. Besides a method to show the widget the Ridget should have methods to set the message, the title, the type/icon and the combination of buttons. When using a MessageDialog all this information is set in the constructor. When using a MessageBox the type/icon and the buttons are part of the style that can also be set only in the constructor. So both widgets can't be sufficiently modified by the Ridget.
 
How it could be done
There could be a special Riena MessageBox-widget that is bound to the MessageBoxRidget. The Riena MessageBox-widget would use a org.eclipse.swt.widgets.MessageBox or a org.eclipse.jface.dialogs.MessageDialog to show the actual message dialog. The MessageBox-widget would be SWT-specific while the MessageBoxRidget would offer an SWT-independent interface IMessageBoxRidget.
 
Pros
- would allow a controller that does not depend on a specific UI-toolkit to show messages
- would ensure uniform appearance of messages throughout an application (when consistently used)
 
Cons
- yet another way to show messages beside MessageBox, MessageDialog, ErrorDialog,...
- MessageDialog already offers a convenient way to show standard messages (openInformation(..), openQuestion(..), etc.) so that the Ridget would not add much extra functionality
 
Any ideas or comments?
 
Greetings,
Carsten
 


_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev

Back to the top