This base view is an abstract class that provides mechanism that are necessary in any view :
This view also handle a current selection of nodes and sprites.
The main method to implement is {@link #render(Graphics2D)}. This method is called each time the graph needs to be rendered anew in the canvas.
The {@link #render(Graphics2D)} is called only when a repainting is reallyneeded.
All the painting, by default, is deferred to a {@link GraphRenderer}instance. This mechanism allows developers that do not want to mess with the viewer/view mechanisms to render a graph in any Swing surface.
This abstract view is able to create a frame that is added around this panel (each view is a JPanel instance). The frame can be removed at any time.
This abstract view handles the closing protocol. This means that it will close the view if needed, or only hide it to allow reopening it later. Furthermore it adds the "ui.viewClosed" attribute to the graph when the view is closed or hidden, and removes it when the view is shown. The value of this graph attribute is the identifier of the view.
|
|
|
|