Gillius's Programming

Latest News

View the full Gillius's Programming Blog

IMAP Duplicate Mails Deleter -- February 9, 2014 9:18 PM

I have a problem with Thunderbird. For some reason when I try to move a few thousand e-mails, in the destination folder the majority of messages get duplicates. Some could get 2 duplicates. I have no idea why. But I created https://github.com/gillius/imap-dupe-delete to clean up the mess. I built it for my own use and used it only on my own account. But it might be useful to others in the same situation or as an example of JavaMail usage from Groovy (as that is the language I used). I also used the GMavenPlus plugin to build from Maven. If you have Java and Maven it will be easy to run.

JFXUtils 0.3: Mousewheel Zooming -- March 15, 2013 10:13 PM

Version 0.3 of JFXUtils is released now, with only two real changes:

  1. Support for zooming with mousewheel. The location of the cursor is used as the "focal point" of zooming in or out. If cursor is on X or Y axis, only that axis is zoomed. ChartZoomManager allows drag zoom and wheel zoom to be enabled independently, by default both are on.
  2. Fix/workaround for auto-zooming in the charting example.

You can get it at the GitHub project page, or directly from the Gillius.org Maven Repository. You can also view documentation online.

I released version 0.2 of the JFXUtils project I started recently, and now there is code for chart panning, and zooms are now animated. With panning and zooming working, I noticed that the default NumberAxis was not working at all how I would like. The tick positions remain in the same place no matter what the graph's bounds, and the values of the ticks then change to reflect the value. Well, with zooming and panning you will get for example a lower bound of "1432.34234", and this is exactly what NumberAxis will display. So, I created a replacement axis type called StableTicksAxis that keeps the ticks at the same data location for the given zoom level, which has a drastically better UI feel when the graph is changing rapidly during panning and zooming operations. It automatically computes the number and distance between tick marks based on the size of the graph, the graph label font, and the range of data displayed to maximize the number of tick marks without having the labels run into each other. When auto-ranging, it can force zero in the view like NumberAxis, and also like NumberAxis it can add some padding around the data, but unlike NumberAxis the amount of padding (as a percentage of graph size) is configurable.