Search in sources :

Example 1 with OverviewGraphModel

use of easik.overview.util.graph.OverviewGraphModel in project fql by CategoricalData.

the class Overview method initializeOverview.

/**
 * When we initialise the overview, we flush out all the data concerning the
 * sketch itself.
 *
 * This methods serves as a "new overview" function.
 */
public void initializeOverview() {
    clearSelection();
    if (_sketchNodes != null) {
        for (SketchNode node : _sketchNodes.values()) {
            node.getFrame().dispose();
        }
    }
    if (_viewNodes != null) {
        for (ViewNode node : _viewNodes.values()) {
            node.getFrame().dispose();
        }
    }
    setFile(null);
    _sketchNodes = new HashMap<>();
    _viewNodes = new HashMap<>();
    _viewEdges = new HashMap<>();
    _docInfo = new DocumentInfo(_appFrame);
    if (_appFrame.getInfoTreeUI() != null) {
        _appFrame.setInfoTreeUI(new OverviewInfoTreeUI(_appFrame));
        _appFrame.getInfoTreeUI().refreshTree();
    }
    OverviewGraphModel model = new OverviewGraphModel(this);
    GraphLayoutCache glc = new GraphLayoutCache(model, new DefaultCellViewFactory());
    setModel(model);
    setGraphLayoutCache(glc);
}
Also used : DefaultCellViewFactory(org.jgraph.graph.DefaultCellViewFactory) GraphLayoutCache(org.jgraph.graph.GraphLayoutCache) ViewNode(easik.overview.vertex.ViewNode) OverviewGraphModel(easik.overview.util.graph.OverviewGraphModel) OverviewInfoTreeUI(easik.ui.tree.OverviewInfoTreeUI) SketchNode(easik.overview.vertex.SketchNode) DocumentInfo(easik.DocumentInfo)

Aggregations

DocumentInfo (easik.DocumentInfo)1 OverviewGraphModel (easik.overview.util.graph.OverviewGraphModel)1 SketchNode (easik.overview.vertex.SketchNode)1 ViewNode (easik.overview.vertex.ViewNode)1 OverviewInfoTreeUI (easik.ui.tree.OverviewInfoTreeUI)1 DefaultCellViewFactory (org.jgraph.graph.DefaultCellViewFactory)1 GraphLayoutCache (org.jgraph.graph.GraphLayoutCache)1