Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Saturday, 13 October 2012

Still here!

Sorry I've not posted for ages, my pi has been playing up a bit and I've been distracted by another side-project: a custom swing component. It's still very much in its infancy, so stay tuned for updates.

The component is a table of triangular cells; formed of rectangular cells diagonally divided into four.

It's heavily based on OpenJDK's JTable, but a lot simpler. It started as a standard JTable with a custom model and cell renderer that would group 4 elements together. However, this did not seem to provide enough power to be able to select a single triangle cell, so I decided to make the component fit the logical model more accurately. At the moment it can render a simple array-based table model, except that the model has 3 addressing dimensions; row, column and position in the cell. This causes a few complications, in that all the standard JTable methods and interfaces are built around 2 dimensional coordinates, but it's coming along... when I'm not studying Scala.