Package org.nanograph.drawing.layout

Examples of org.nanograph.drawing.layout.RootNodeLayout


         circular01Button.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent ae) {
                 fd = new CircularLayoutAlgorithm(400);
                 if (fd instanceof RootNodeLayout) {
                     RootNodeLayout temp = (RootNodeLayout) fd;
                     temp.setRootNodes(currentSelection);
                 }
                 gp.getNanoGraph().setLayout(fd);
             }
         });

         topPanel.add(circular01Button, FlowLayout.LEFT);


         JButton circularButton = new JButton("Circular Layout");

         circularButton.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent ae) {
                 fd = new CircularLayout(gp);
                 if (fd instanceof RootNodeLayout) {
                     RootNodeLayout temp = (RootNodeLayout) fd;
                     temp.setRootNodes(currentSelection);
                 }
                 gp.getNanoGraph().setLayout(fd);
             }
         });

         topPanel.add(circularButton, FlowLayout.LEFT);
         JButton treeButton = new JButton("Tree Layout");

         treeButton.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent ae) {
                 fd = new TreeLayout(gp);
                 if (fd instanceof RootNodeLayout) {
                     RootNodeLayout temp = (RootNodeLayout) fd;
                     temp.setRootNodes(currentSelection);
                 }
                 gp.getNanoGraph().setLayout(fd);
             }
         });
View Full Code Here



    public void selectionChanged(GraphSelectionEvent e) {
        currentSelection = e.getSelection().getSelectedObjects();
        if (fd instanceof RootNodeLayout) {
            RootNodeLayout temp = (RootNodeLayout) fd;
            temp.setRootNodes(e.getSelection().getSelectedObjects());
        }
    }
View Full Code Here

TOP

Related Classes of org.nanograph.drawing.layout.RootNodeLayout

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.