Package org.jgraph.graph

Examples of org.jgraph.graph.DefaultCellViewFactory


      addSampleData(model);
    } else
      setModel(model);
    if (layoutCache == null)
      layoutCache = new GraphLayoutCache(model,
          new DefaultCellViewFactory());
    setGraphLayoutCache(layoutCache);
    updateUI();
  }
View Full Code Here


    {
      techtreePanel = new JPanel(new BorderLayout());
      techtreePanel.setOpaque(false);
      GraphModel gmodel = new DefaultGraphModel();
      GraphLayoutCache gcache = new GraphLayoutCache(gmodel,
        new DefaultCellViewFactory());
      JGraph graphPanel = new JGraph(gmodel, gcache);
     
      DefaultGraphCell[] cells = new DefaultGraphCell[144];
     
      int i = 0;
View Full Code Here

   */
  public class IconGraph extends GraphEd.MyGraph {
    public IconGraph(GraphModel model) {
      super(model);
      getGraphLayoutCache().setAutoSizeOnValueChange(true);
      getGraphLayoutCache().setFactory(new DefaultCellViewFactory() {
        public CellView createView(GraphModel model, Object c) {
          CellView view = null;
          if (c instanceof CustomCell) {
            return new JGraphIconView(c);
          } else if (c instanceof Port) {
View Full Code Here

        graph.setModel(model);

        setProjectController(mediator);
        setDataDomain(domain);

        GraphLayoutCache view = new GraphLayoutCache(model, new DefaultCellViewFactory());
        graph.setGraphLayoutCache(view);

        graph.addMouseListener(new MouseAdapter() {

            public void mouseReleased(MouseEvent e) {
View Full Code Here

      addSampleData(model);
    } else
      setModel(model);
    if (layoutCache == null)
      layoutCache = new GraphLayoutCache(model,
          new DefaultCellViewFactory());
    setGraphLayoutCache(layoutCache);
    updateUI();
  }
View Full Code Here

  }

  // Hook for subclassers
  protected JGraph createGraph() {
    JGraph graph = new MyGraph(new MyModel());
    graph.getGraphLayoutCache().setFactory(new DefaultCellViewFactory() {

      // Override Superclass Method to Return Custom EdgeView
      protected EdgeView createEdgeView(Object cell) {

        // Return Custom EdgeView
View Full Code Here

      addSampleData(model);
    } else
      setModel(model);
    if (layoutCache == null)
      layoutCache = new GraphLayoutCache(model,
          new DefaultCellViewFactory());
    setGraphLayoutCache(layoutCache);
    updateUI();
  }
View Full Code Here

TOP

Related Classes of org.jgraph.graph.DefaultCellViewFactory

Copyright © 2018 www.massapicom. 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.