Ignore:
Timestamp:
01/09/13 00:09:10 (11 years ago)
Author:
psniegowski
Message:

Add f0 parsing and f0->Model transformation.

Location:
java/main/src/main/java/com/framsticks/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/gui/Browser.java

    r77 r78  
    4545
    4646    @Override
    47     protected void configure() {
     47    protected void configure() throws Exception {
    4848        super.configure();
    4949    }
  • java/main/src/main/java/com/framsticks/gui/Frame.java

    r77 r78  
    11package com.framsticks.gui;
    22
     3import com.framsticks.core.Node;
    34import com.framsticks.core.Path;
    45import com.framsticks.gui.view.*;
     
    1213import javax.swing.tree.*;
    1314import java.awt.*;
     15import java.awt.datatransfer.StringSelection;
    1416import java.awt.event.ActionEvent;
    1517import java.awt.event.MouseAdapter;
     
    7577        treePopupMenu.add(new JMenuItem("Refresh"));
    7678        treePopupMenu.add(new JMenuItem("Open in new frame as root"));
     79                addNodeActionToTreePopupMenu("Copy path to clipboard", new NodeAction() {
     80                        @Override
     81                        public void actionPerformed(TreeNode treeNode) {
     82                                Path path = treeNode.getInstancePath();
     83                                StringSelection selection = new StringSelection(path.toString());
     84                                getToolkit().getSystemClipboard().setContents(selection, selection);
     85                        }
     86                });
    7787        //this.add(createMenuItem("Add to favourites", null));
    7888        //this.add(createMenuItem("Remove from favourites", null));
  • java/main/src/main/java/com/framsticks/gui/TreeNode.java

    r77 r78  
    124124        LOGGER.debug("updating children of " + this);
    125125        AccessInterface access = p.getInstance().bindAccess(p.getTop());
     126                if (access == null) {
     127                        return;
     128                }
    126129        final List<Path> childrenPaths = new LinkedList<Path>();
    127130        /**Prepare path for each child.*/
     
    210213    }
    211214
    212 
    213215        public final Panel getPanel() {
    214216        assert frame.isActive();
     
    222224        }
    223225        AccessInterface access = p.getInstance().bindAccess(p);
    224         assert access != null;
     226                if (access == null) {
     227                        return;
     228                }
    225229        StringBuilder t = new StringBuilder();
    226230        /** html formatting is used here, since tooltips in swing do not support simple \n line breaks */
     
    494498
    495499                return true;
     500        }
     501
     502        public Path getInstancePath() {
     503                assert frame.isActive();
     504                return path;
    496505        }
    497506
Note: See TracChangeset for help on using the changeset viewer.