JFreeView
JFreeView is a framework based on Java Swing and Java2D for visualizing and editing various kinds of models. The central objects are views that render them selfs on a JPanel. Views can be moved and resized by connected handles.
1. Use the library in your code
There are three different components you can use from the JFreeView project.
-
se.bluebrim.viewThis component contains a 2D scene graph that can be used when implementing a graphical application in Swing. To use it include the following in your pom.xml:
se.bluebrim:se.bluebrim.view:1.x.x
se.bluebrim.view.example.movableviewscontains an example how this component can be used. -
se.bluebrim.desktop.applicationUse this component to develop a multi document desktop application in Java Swing. You just have to create four classes to get the whole thing running:-
YourDesktopAppextendingse.bluebrim.desktop.DesktopApp -
YourFileEditorextendingse.bluebrim.desktop.FileEditor -
YourModelextendingse.bluebrim.crud.esox.DirtyPredicateModel -
YourPanelextendingse.bluebrim.crud.client.DirtyPredicatePanelHave a look at
se.bluebrim.desktop.application.example.jdbcto se how this is done.To use the component include the following in your pom.xml:
<dependency> <groupId>se.bluebrim</groupId> <artifactId>se.bluebrim.desktop.application</artifactId> <version>1.x.x</version> </dependency>
-
-
se.bluebrim.desktop.application.graphicalA component that extendsse.bluebrim.desktop.applicationwith functions for creating a graphical desktop application using these.bluebrim.viewcomponent. Adds also functions for saving in the pdf and svg formats. The only difference from using these.bluebrim.desktop.applicationcomponent is that you subclassse.bluebrim.desktop.graphical.GraphicalFileEditorinstead ofse.bluebrim.desktop.FileEditor.You can study the
se.bluebrim.view.example.architecturegraphexample to see how this is done.To use the component include the following in your pom.xml:
<dependency> <groupId>se.bluebrim</groupId> <artifactId>se.bluebrim.desktop.application.graphical</artifactId> <version>1.x.x</version> </dependency>
2. Try examples
2.1. Movable Views Example
This application show many features of the JFreeView library.
Run class: se.bluebrim.view.example.movableviews.MovableViewsExample
2.2. Database Schema Graph Example
Reads the meta data from a database and creates a graph of the tables and the foreign key relations. This demo uses an embedded memory based HSQLDB containing a simple Pet Store database model.
Run class: se.bluebrim.view.example.dbschemagraph.SchemaGraphBuilder
2.3. Architecture Graph Example
The ArchitectureGraph class that can be run by checking out the source code in your IDE. The class creates an example of an
architecture graph. The blocks in the graph are created programmatically and the layout of the blocks are handled by Swing layout
managers. The position of the blocks and additional graphic elements that are created from resources files can be manually adjusted in
the GUI by dragging around the elements. The resulting layout is saved in a properties file.
Run class: se.bluebrim.view.example.architecturegraph.ArchitectureGraph
The graph is inspired by JavaSE architecture graph.
2.4. JSVGCanvas Example
The example is a desktop application with one single JSVGCanvas browsing a series of SVG-files The icons for the tool bar was found at: http://www.iconfinder.net The purpose for the class is to demonstrate how to include SVG graphics into Swing components. It’s not obvious how this is done with the Batik framework.
Run class:
se.bluebrim.example.svgcanvas.SVGCanvasExample



