Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Basic SWT widgets enhancement"

(some enhanced functionality)
(Primary goals)
Line 5: Line 5:
  
 
== Primary goals ==
 
== Primary goals ==
===enhance some basic widgets===
+
===Enhance some basic widgets===
 
* '''rich combo box''': this combo box will support image and mix(image and text)
 
* '''rich combo box''': this combo box will support image and mix(image and text)
 
I have found that there are two ways of implements such a extended combobox widget:
 
I have found that there are two ways of implements such a extended combobox widget:
  
''Enhancing the Combo-Widget with Images'': you can see it on page http://www.richclient2.eu/2006_03_03/enhancing-the-combo-widget-with-images/
+
**''Enhancing the Combo-Widget with Images'': you can see it on page http://www.richclient2.eu/2006_03_03/enhancing-the-combo-widget-with-images/
''ComboBoxEx'': you can see the introduction of this widget on page http://www.milewski.ws/2009/04/combo-box-with-images-in-swt/
+
**''ComboBoxEx'': you can see the introduction of this widget on page http://www.milewski.ws/2009/04/combo-box-with-images-in-swt/
  
 
The first implementation is a good way to fulfil such a function,in which it just make some modifications of combobox source code in swt.It is simple and we do not need consider much about cross-platform problem,because it just builds on basic widgets afforded by swt like primary combobox widget.But what the problem is: maybe the SWT group does not like this coding style and it is just a workaround to implement a function,thus should not be as a part of SWT.
 
The first implementation is a good way to fulfil such a function,in which it just make some modifications of combobox source code in swt.It is simple and we do not need consider much about cross-platform problem,because it just builds on basic widgets afforded by swt like primary combobox widget.But what the problem is: maybe the SWT group does not like this coding style and it is just a workaround to implement a function,thus should not be as a part of SWT.
Line 22: Line 22:
 
Someone has put forward this problem in Eclipse's mailing-list,but there still are not very good solutions.I will have a careful talk with Nebula and SWT developers.Moreover,if this widget has been implemented,the following function will be well fulfiled.
 
Someone has put forward this problem in Eclipse's mailing-list,but there still are not very good solutions.I will have a careful talk with Nebula and SWT developers.Moreover,if this widget has been implemented,the following function will be well fulfiled.
  
===some enhanced functionality===
+
===Add some functionality===
 
* a batch of rich buttons: e.g. if the button style as been set style_ok, a button containing a "ok" image will be created.And there are many styles will be supportd:style_ok,style_cancel,style_info,style_err,etc.
 
* a batch of rich buttons: e.g. if the button style as been set style_ok, a button containing a "ok" image will be created.And there are many styles will be supportd:style_ok,style_cancel,style_info,style_err,etc.
 
You can see the snapshot of these buttons in the following pic as a sample that our rich buttons would be implemented.[[Image:Buttons.jpg]]
 
You can see the snapshot of these buttons in the following pic as a sample that our rich buttons would be implemented.[[Image:Buttons.jpg]]

Revision as of 08:37, 5 May 2009

About

'Nebula' has been developed to make the widget in Eclipse rich and colorful,but the basic widgets are all the same and not enhanced. For example,the combo box widget still does not support an image item or a mix(image and text).Actually,there are many aspects for basic SWT widgets to be enhanced.If possible,I think these "enhanced" widgets can be a part of 'Nebula' before accepted by SWT.


Primary goals

Enhance some basic widgets

  • rich combo box: this combo box will support image and mix(image and text)

I have found that there are two ways of implements such a extended combobox widget:

The first implementation is a good way to fulfil such a function,in which it just make some modifications of combobox source code in swt.It is simple and we do not need consider much about cross-platform problem,because it just builds on basic widgets afforded by swt like primary combobox widget.But what the problem is: maybe the SWT group does not like this coding style and it is just a workaround to implement a function,thus should not be as a part of SWT.

The second implementation may be a good style that SWT group likes.But there are many problems in it,of which the most import is the cross-platform and we will deal much with Java Native Access library.

  • rich list: this list will also support image and mix

There are not many solutions to solve this problem.I think it's a good and very fundamental function that SWT should support.And if this problem were well settled, a rich combo box supporting image,shown above,will be easily implemented.Because the combo box is just composed of three basic widgets:Text,Button,List,we can simplely replace the basic list widget with our rich list widget.The 'text' area may still only show texts;to solve this,the CLabel can be introduced to support image and text.

  • rich button: this button widget will also support image and mix

Someone has put forward this problem in Eclipse's mailing-list,but there still are not very good solutions.I will have a careful talk with Nebula and SWT developers.Moreover,if this widget has been implemented,the following function will be well fulfiled.

Add some functionality

  • a batch of rich buttons: e.g. if the button style as been set style_ok, a button containing a "ok" image will be created.And there are many styles will be supportd:style_ok,style_cancel,style_info,style_err,etc.

You can see the snapshot of these buttons in the following pic as a sample that our rich buttons would be implemented.Buttons.jpg

If the rich button widget were implemented,a batch of buttons with different styles will be easily created.We just need to find the corresonding images to support these styles.If you ever used C++ Builder to developement desk GUIs,you will be familiar with these buttons containing a small image showing apparent information.

Source code

The code will be hosted on google code.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.