Package org.antlr.works.visualization.graphics.path

Examples of org.antlr.works.visualization.graphics.path.GPath


            if(getCurrentGraph() instanceof GGraphGroup)
                handleKeyPressedInGraphGroup(e);
        }

        public void handleKeyPressedInGraphGroup(KeyEvent e) {
            GPath path = getCurrentPath();
            switch(e.getKeyCode()) {
                case KeyEvent.VK_RIGHT:
                    path.nextElement();
                    pathCurrentElementDidChange();
                    e.consume();
                    break;
                case KeyEvent.VK_LEFT:
                    path.previousElement();
                    pathCurrentElementDidChange();
                    e.consume();
                    break;
                case KeyEvent.VK_UP:
                    path.lastElement();
                    pathCurrentElementDidChange();
                    e.consume();
                    break;
                case KeyEvent.VK_DOWN:
                    path.firstElement();
                    pathCurrentElementDidChange();
                    e.consume();
                    break;

                case KeyEvent.VK_A:
View Full Code Here


        }

        if(nextNode != null)
            elements.add(GPathElement.createElement(nextNode));

        getPathGroup().addPath(new GPath(elements, disabled));
    }
View Full Code Here

        elements.add(GPathElement.createElement(node));
        elements.add(GPathElement.createElement(node.getLink(t)));

        /** This path has to be visible but not selectable */
        GPath path = new GPath(elements, true);
        path.setVisible(true);
        path.setSelectable(false);
        getPathGroup().addPath(path);
    }
View Full Code Here

        } else
            super.processMouseEvent(e);
    }

    public void pathCurrentElementDidChange() {
        GPath path = getCurrentPath();
        Rectangle rect = path.getBoundsOfSelectedElement();
        if(!rect.isEmpty()) {
            // Expand the rectangle a little bit so the rectangle is "more" visible
            rect.x -= 50;
            rect.y -= 50;
            rect.width += 100;
View Full Code Here

TOP

Related Classes of org.antlr.works.visualization.graphics.path.GPath

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.