Examples of JGraph


Examples of diva.graph.JGraph

        // display the graph.
        final GraphController gc = new BusContentionGraphController();

        final GraphPane gp = new GraphPane(gc, _graph);
        _jgraph = new JGraph(gp);
        _jgraph.repaint();

        // Adding it to the center so that it fills the containing panel.
        _divaPanel.add(_jgraph, BorderLayout.CENTER);
View Full Code Here

Examples of diva.graph.JGraph

                controller.dispatch(new GraphViewEvent(this,
                        GraphViewEvent.NODE_DRAWN, newFigure));
            }
        };
        _graphPane = new GraphPane(controller, graphModel);
        _jgraph = new JGraph(_graphPane);
        _jgraph
                .setBorder(BorderFactory
                        .createEtchedBorder(EtchedBorder.RAISED));
        // The icon window is fixed size.
        _jgraph.setMinimumSize(new Dimension(_ICON_WINDOW_WIDTH,
View Full Code Here

Examples of org.jgraph.JGraph

        sourceExprMap.clear();
        visitedVarNames.clear();
    }

    public void showInFrame() {
        JGraph jgraph = createJGraph();
        //jgraph.setPreferredSize(DEFAULT_SIZE);
        jgraph.setBackground(Color.decode(DEFAULT_BG_COLOR));
        // Show in Frame
        this.frame = new JFrame(APPLT_TITLE);
        // add menu bar
        MyMenuChooser menuBar = new MyMenuChooser(frame);
        frame.setJMenuBar(menuBar);
View Full Code Here

Examples of org.jgraph.JGraph

    }

    private JGraph createJGraph() {
        // create a visualization using JGraph, via an adapter
        JGraphModelAdapter m_jgAdapter = new JGraphModelAdapter(graph, JGraphModelAdapter.createDefaultVertexAttributes(), createDefaultEdgeAttributes());
        this.jgraph = new JGraph(m_jgAdapter);
        // layout setting
        JGraphUtils.applyOrderedTreeLayout(graph, m_jgAdapter, jgraph);
        // vertex color setting
        Iterator vertexIter = graph.vertexSet().iterator();
        while(vertexIter.hasNext()) {
View Full Code Here

Examples of org.jgraph.JGraph

                        StaticContext sc = t.getStaticContext();
                        sc.setSystemBaseURI(statEnv.getSystemBaseURI());
                        m.staticAnalysis(sc);
                        m.visit(GraphConstructionVisitor.this, sc);
                        // create panel
                        final JGraph jgraph = createJGraph();
                        jgraph.setBackground(Color.decode(DEFAULT_BG_COLOR));
                        final JScrollPane panel = new JScrollPane(jgraph);
                        panel.setPreferredSize(DEFAULT_SIZE);
                        _frame.getContentPane().add(panel);
                        _frame.pack();
                    } catch (Exception err) {
View Full Code Here

Examples of org.jgraph.JGraph

    directedGraph = new ObservableGraph<ModelNode, IdentifiableEdge>(
        new DirectedSparseGraph<ModelNode, IdentifiableEdge>());
    m_jgAdapter = new JungJGraphModelAdapter(directedGraph);

    jgraph = new JGraph(m_jgAdapter);
    for (MouseListener ml : jgraph.getMouseListeners())
      jgraph.removeMouseListener(ml);
    for (MouseMotionListener ml : jgraph.getMouseMotionListeners())
      jgraph.removeMouseMotionListener(ml);
    for (MouseWheelListener ml : jgraph.getMouseWheelListeners())
View Full Code Here

Examples of org.jgraph.JGraph

    return button;
  }

  void editCell() throws Exception {
    if (SelectedCell.isSelectedCellActionCell()) {
      JGraph graph = Util.getCurrentGraph();
      if (graph == null)
        return;

      ActionPropertiesPanel actionPropertiesPanel = new ActionPropertiesPanel(graph);
      if (actionPropertiesPanel.getReady() == false)
View Full Code Here

Examples of org.jgraph.JGraph

    else
      defautEdit();
  }

  void setToolAndCursor(JGraphEditorTool tool) {
    JGraph graph = diagramPane.getGraph();
    toolbox.setSelectionTool(tool, graph);
    graph.requestFocus();
  }
View Full Code Here

Examples of org.jgraph.JGraph

import org.jgraph.graph.DefaultGraphCell;
import org.jgraph.graph.DefaultPort;

public class SelectedCell {
  public static boolean isDefaultGraphCellSelected() {
    JGraph graph = Util.getCurrentGraph();
    return isDefaultGraphCellSelected(graph);
  }
View Full Code Here

Examples of org.jgraph.JGraph

        return false;
    return true;
  }

  public static boolean isSelectedCellActionCell() {
    JGraph graph = Util.getCurrentGraph();
    return isSelectedCellActionCell(graph);
  }
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.