I am working on a programm that should generate dynamically tournament brackets out of a database like this:
Therefore I am searching for a good way to to generate these schematics. It should be possible to edit it at runtime and print it later. Chart generating libs like JFreeChart only offer standard charts and not schematics and XLS-generating tools also don’t seem to be the best approach.
Another solution might using Java graphics, but this really seems to be reinventing the wheel.
Thanks for any ideas !
If no existing implementation is satisfactory, then you’ll need to create a custom component and data model. Swing seems apropos, and the article A Swing Architecture Overview is a helpful guide. To pave the way for future Look & Feel variations, the approach shown in How to Write a Custom Swing Component will provide a strong foundation, even if you only implement one UI delegate.
In the particular case of
JFreeChart, which uses a light-weight theme architecture within a chosen Swing L&F, consider extendingAbstractRendererandAbstractDatasetfor the view and model, respectively. Make your JDBC dataset an extension of your dataset implementation.