A SWT Calendar widget
10. April 2006
Today I want to show how to use of the open-source project SWT-Calendar. With a few lines of code you can implement a wonderful small calendar widget for SWT, that is not delivered by default.


Today I want to show how to use of the open-source project SWT-Calendar. With a few lines of code you can implement a wonderful small calendar widget for SWT, that is not delivered by default.

If you’re having dependencies to org.eclipse.ui.ide and you launch your RCP you’ll automatically get an entry in the menu-bar that is called “Convert Line Delimiters to” and also “Last Edit Location”, although you don’t need it. To remove this entries place the following lines in your (more…)
It is always recommended to deliver a JRE with your Eclipse-Product, because it has tow major advantages.
But theres also a great advantage: Sun doesn’t provide by default a manifest-file for displaying the widgets in the current theme of your operating-system (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6178745), but uses the default look&feel of Windows. To fix this you need to the javaw.exe.manifest, located in your org.eclipse.swt.win32.win32.x86_x.y.z.jar-Plugin Package.
To bundle your VM, just create a folder “jre” in your [Eclipse-Root]-Directory copy the vm, take the Manifest-file and copy it to [Eclipse-Root]/jre/bin
Probably you was already faced with the requirement to add small icons to your pulldowns. That looks very nice, but unfortunately there is no common SWT-Widget to realize this.
Fortunately the Eclipse-Framework is OpenSource and we can reprodruce the structure of a SWT-ComboBox. A Combo is not more than a text-field and a small button with an arrow. In addition is a event-handler implemented that shows a Composite as a tooltip with the entries of the “combo-list”. We just have to take this class and change the structure of the content. We don’t want to have a org.eclipse.swt.widgets.List, but a org.eclipse.swt.widgets.Table with multiple org.eclipse.swt.widgets.TableItems where you can specify an image. After adjusting the access-methods we have a new cool Widget, that has the same structure and methods like the “built-in”s.
The following describes the basics of creating editors.
In our example we want to provide an simple editor for the object org.javawiki.model.SubProcess and a MultiPageEditor with two pages for the object org.javawiki.model.Step. At first we define the extension points. (more…)
Today I want to show how to add a sorter to your JFace-Table. The requirement is to sort descending und ascending by clicking on the TableColumn-Header.
JFace already provides sorting-functionality. We just have to provide something like an alogrithm to arrange the items. For that we implemented the CollectionSorter that uses the default Collator from ViewerSorter. (more…)
In complex applications you also have very many images that want to be placed to the right time on the right place.

And because some good software-architects already have concepted the model
, in the most cases you want to visualize a special object or a special property of an object with an image in your JFace-List or Tree. Imagine you have 50 JFace-Viewers and 300 different Icons. Do you really want to implement in every LabelProvider how and when to access to which image? I guess, no.
At the following I will provide an easy way to manage image-contribution to your different label-providers. (more…)
Before I can start implementing cool gimmicks with eclipse I need a datastructure. I’ve chosen a very similar tree-structure of a process. A process has different steps, subprocesses , lists of conditions. All these elements can be linked. It’s a very simple structure and all upcoming examples are based on this model-plugin.
Powered by WordPress