Examples of JGraph


Examples of diva.graph.JGraph

        // Use the renderer in the JGraph
        GraphPane gp = new GraphPane(bgc, new BasicGraphModel());
        bgc.getNodeController().setNodeRenderer(typedRenderer); // <=== HERE!

        JGraph g = new JGraph(gp);

        // Display it all
        context.getContentPane().add("Center", g);

        // Build the model
View Full Code Here

Examples of diva.graph.JGraph

        _graph = _constructDivaGraph();

        // display the graph.
        final GraphController gc = new LocalZenoGraphController();
        final GraphPane gp = new GraphPane(gc, _graph);
        _jgraph = new JGraph(gp);
        _divaPanel.add(_jgraph);

        StateListener listener = new StateListener((GraphPane) _jgraph
                .getCanvasPane());
        _join1.addDebugListener(listener);
View Full Code Here

Examples of diva.graph.JGraph

        _model = (TypedCompositeActor) target;

        // ((TypedCompositeActor) (((PtolemyEffigy) (_tableau.getContainer()))
        //      .getModel()));
        BasicGraphFrame parent = (BasicGraphFrame) (_tableau.getFrame());
        JGraph jGraph = parent.getJGraph();
        GraphPane graphPane = jGraph.getGraphPane();
        _controller = graphPane.getGraphController();
        _selectionModel = _controller.getSelectionModel();

        Interactor interactor = _controller.getEdgeController(new Object())
                .getEdgeInteractor();
View Full Code Here

Examples of diva.graph.JGraph

                    component.requestFocus();
                }
            }
        });

        setJGraph(new JGraph(pane));
        _dropTarget = new EditorDropTarget(_jgraph);
        return _jgraph;
    }
View Full Code Here

Examples of diva.graph.JGraph

     *  ptolemy model.
     *  @return the JGraph.
     *  @see #setJGraph(JGraph)
     */
    public JGraph getJGraph() {
        JGraph graph = _frameController.getJGraph();
        if (graph == null) {
            graph = super.getJGraph();
        }
        return graph;
    }
View Full Code Here

Examples of diva.graph.JGraph

                CompositeActorMatcher.class).iterator();
        boolean first = true;
        while (cases.hasNext()) {
            CompositeActorMatcher matcher = (CompositeActorMatcher) cases
                    .next();
            JGraph jgraph = _addTabbedPane(matcher, false);
            // The first JGraph is the one with the focus.
            if (first) {
                first = false;
                _frame.setJGraph(jgraph);
            }
View Full Code Here

Examples of diva.graph.JGraph

                if (!component.hasFocus()) {
                    component.requestFocus();
                }
            }
        });
        JGraph jgraph = new JGraph(pane);
        String name = matcher.getName();
        jgraph.setName(name);
        int index = _tabbedPane.getComponentCount();
        // Put before the default pane, unless this is the default.
        if (newPane) {
            index--;
        }
        _tabbedPane.add(jgraph, index);
        jgraph.setBackground(BasicGraphFrame.BACKGROUND_COLOR);
        // Create a drop target for the jgraph.
        new EditorDropTarget(jgraph);
        return jgraph;
    }
View Full Code Here

Examples of diva.graph.JGraph

            GraphModel model = new ActorGraphModel(_toplevel);
            pane = new GraphPane(controller, model);
        }

        JGraph modelViewer = new JGraph(pane);

        // Get dimensions from the model, if they are present.
        // Otherwise, use the same defaults used by vergil.
        boolean boundsSet = false;

        try {
            SizeAttribute vergilBounds = (SizeAttribute) _toplevel
                    .getAttribute("_vergilSize", SizeAttribute.class);
            boundsSet = vergilBounds.setSize(modelViewer);
        } catch (Throwable throwable) {
            // Ignore and set to default.
        }

        if (!boundsSet) {
            // Set default size
            Dimension size = new Dimension(400, 300);
            modelViewer.setMinimumSize(size);
            modelViewer.setPreferredSize(size);
        }

        // Inherit the background color from the applet parameter.
        modelViewer.setBackground(getBackground());

        // Do not include a scroll pane, since generally we size the
        // applet to show the entire model.
        // JScrollPane scrollPane = new JScrollPane(modelViewer);
        // getContentPane().add(scrollPane, BorderLayout.NORTH);
View Full Code Here

Examples of diva.graph.JGraph

        Iterator cases = ((Case) entity).entityList(Refinement.class)
                .iterator();
        boolean first = true;
        while (cases.hasNext()) {
            Refinement refinement = (Refinement) cases.next();
            JGraph jgraph = _addTabbedPane(refinement, false);
            // The first JGraph is the one with the focus.
            if (first) {
                first = false;
                setJGraph(jgraph);
            }
View Full Code Here

Examples of diva.graph.JGraph

                if (!component.hasFocus()) {
                    component.requestFocus();
                }
            }
        });
        JGraph jgraph = new JGraph(pane);
        String name = refinement.getName();
        jgraph.setName(name);
        int index = _tabbedPane.getComponentCount();
        // Put before the default pane, unless this is the default.
        if (newPane) {
            index--;
        }
        _tabbedPane.add(jgraph, index);
        jgraph.setBackground(BACKGROUND_COLOR);
        // Create a drop target for the jgraph.
        // FIXME: Should override _setDropIntoEnabled to modify all the drop targets created.
        new EditorDropTarget(jgraph);
        return jgraph;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.