I’m still here, but I’m still swamped with a thousand projects, so both bugfixing and other stuff has suffered. I’m trying to catch up but I’m making no promises right now (such is life in open source). If there’s an urgent bug that you reported that I missed responding to, feel free to ping me and I’ll try to take a look. New features will have to come later!
I know it’s been ages since any updates, but I have not had much time to write long articles between work and other projects. I’m also still rather stuck in the world of Silverlight, which is a whole different story. Microsoft is doing funny things there as well, it might not even survive beyond a mobile platform.
It’s worth mentioning however, that the GanttChart has had quite a few bug fixes lately as well as improvements (new features) so if you’re a user of that it may be worth testing the latest nightly build and see if it makes life better on your end. I know there’s requests for Millisecond and Second “zoom views” but apart from some sketchy code that isn’t working as I want it, it hasn’t made it into any release yet, but it’s on the big TODO list and a priority.
Also, the Eclipse Nebula project “build system” has been broken for quite a while, so if you want the latest code (as always), use CVS or grab it from the nightly builds section on this site.
I’m hoping I’ll find time for some new articles going forward.
I get loads of traffic and email thanks the Ribbon. It’s truly an alpha project that went completely beyond what I had imagined. It’s exciting of course, but as much as it should give me a warm fuzzy feeling, it actually makes me rather nauseous. The thing is, a lot of the code is a total mess, it’s embarrassing, and I’ll freely admit it. It was never written as a “thought out” project, it was simply written as a not-so-quick “test” to see if it was possible to do a Ribbon component in pure SWT. The answer was “kind of”, and that’s where it got left off.
After having worked with Microsoft Silverlight and XAML lately I realized how simple XAML makes it to do stuff that I spent hours writing code for in the Ribbon. For example; rounded corners, gradient borders, multi-gradient fills, etc. It’s a pleasure to work with, easy to change, and it moves you forward at a good pace – and that’s how I feel it should be. I doubt anyone would download the Ribbon source as it is now, look at the render classes and think “great, I’ll make a change riiiight here”, it’s just too complicated and non-customizable. A user wanting to change colors would have to spend hours, days even, just to figure out what pixel is drawn where, and when I look at the code now, I get the same feelings.
Instead of continuing work on the Ribbon to finish “the mess”, I decided that if it was ever going to finish the project and take it out of Alpha, I was going to do all the rendering stuff the right way. And thus started a little test project with Brushes with the intention that if I could make things as easy as writing XAML, I could write all the Ribbon widgets in no-time.
In this article I will explain how to print a table using PaperClips (as of this writing PaperClips is in process of moving to the Eclipse Nebula project). When I say print, I mean print literally, as in printing on a printer. PaperClips is a lightweight API that makes building printable pages very easy. It uses a simple and logical structure that has many useful features and it’s surprisingly flexible. One of the many possibilities is the ability to print tables quite nicely as it has a “GridPrinter” (which is what this article will cover. But you can of course use PaperClips to print nearly anything).
The code for this article will let you print pretty much any SWT table widget of your choice as all you need to do is wrap your table in an interface and off you go. But since this is an article, let’s stick to the plain old SWT table for the sake of the demo. I will mostly go over important snippets of the code and the rest you can download and re-use (download link is at the bottom of the article).
Let’s list a few things we want to achieve with our implementation:
- Print preview (PaperClips gives us most of this already).
- The option to print either just a selection or all items.
- Customizable header and footer.
- Printing table with column sizes as they are in the table.
- Options to specify if headers are printed, where lines are drawn and so on.
The Hexapixel.com server is moving to a new data center. Hopefully downtime should be minimal but it’s possible DNS propagation can take a little longer for some people (depending on ISP). The move is taking place over the next week.
The lack of recent articles is due to being completely swamped. I’m hoping to find some time to write a few more soon!
Also, a new version of the Source Helper should arrive soon, with Eclipse 3.5 support and a whole lot of fixes.
In this article I will explain how to create a custom widget that displays a popup notification dialog in the bottom right corner of your screen (usually above the toolbar on Windows). Here’s what it will look like when we’re done:
We could custom draw everything which would allow us more control over the widget, but for the sake of this article lets stick to using basic SWT components inside a normal Shell that we will make a bit prettier than your typical SWT Shell.
(Do note this has only been tested on Windows, it’s quite possible tweaks are necessary for other platforms).