Package com.sun.hotspot.igv.graph

Examples of com.sun.hotspot.igv.graph.Figure


    }

    public void updateControlPoints() {
        List<Point> newControlPoints = connection.getControlPoints();
        Connection c = connection;
        Figure f = c.getInputSlot().getFigure();
        Point p = new Point(f.getPosition());
        p.translate(c.getInputSlot().getRelativePosition().x, f.getSize().height / 2);
        Point p4 = new Point(f.getPosition());
        p4.translate(c.getInputSlot().getRelativePosition().x, c.getInputSlot().getRelativePosition().y);

        Figure f2 = c.getOutputSlot().getFigure();
        Point p2 = new Point(f2.getPosition());
        p2.translate(c.getOutputSlot().getRelativePosition().x, f2.getSize().height / 2);
        Point p3 = new Point(f2.getPosition());
        p3.translate(c.getOutputSlot().getRelativePosition().x, c.getOutputSlot().getRelativePosition().y);

        /*if(controlPoints.size() >= 2) {
        String className = Preferences.userNodeForPackage(PreferenceConstants.class).get(PreferenceConstants.KEY_LINE_GENERATOR, PreferenceConstants.DEFAULT_LINE_GENERATOR);
        try {
View Full Code Here


                if (!notFirstTime && scene.getScrollPane().getBounds().width > 0) {
                    notFirstTime = true;
                    SwingUtilities.invokeLater(new Runnable() {

                        public void run() {
                            Figure f = EditorTopComponent.this.scene.getModel().getDiagramToView().getRootFigure();
                            if (f != null) {
                                scene.setUndoRedoEnabled(false);
                                scene.gotoFigure(f);
                                scene.setUndoRedoEnabled(true);
                            }
View Full Code Here

            for (Figure f : list) {

                List<Figure> successors = new ArrayList<Figure>(f.getSuccessors());
                if (r.isReversed()) {
                    if (successors.size() == 1) {
                        Figure succ = successors.get(0);
                        InputSlot slot = null;

                        for (InputSlot s : succ.getInputSlots()) {
                            for (Connection c : s.getConnections()) {
                                if (c.getOutputSlot().getFigure() == f) {
                                    slot = s;
                                }
                            }
                        }

                        assert slot != null;
                        slot.setName(f.getProperties().get("dump_spec"));
                        if (f.getProperties().get("short_name") != null) {
                            slot.setShortName(f.getProperties().get("short_name"));
                        } else {
                            String s = f.getProperties().get("dump_spec");
                            if (s != null && s.length() <= 5) {
                                slot.setShortName(s);
                            }

                        }

                        for (InputSlot s : f.getInputSlots()) {
                            for (Connection c : s.getConnections()) {
                                Connection newConn = diagram.createConnection(slot, c.getOutputSlot());
                                newConn.setColor(c.getColor());
                                newConn.setStyle(c.getStyle());
                            }
                        }

                        figuresToRemove.add(f);
                    }
                } else {

                    for (Figure succ : successors) {
                        if (succ.getPredecessors().size() == 1) {
                            if (succ.getProperties().selectSingle(r.getSecondMatcher()) != null && succ.getOutputSlots().size() == 1) {


                                OutputSlot oldSlot = null;
                                for (OutputSlot s : f.getOutputSlots()) {
                                    for (Connection c : s.getConnections()) {
                                        if (c.getInputSlot().getFigure() == succ) {
                                            oldSlot = s;
                                        }
                                    }
                                }

                                assert oldSlot != null;

                                OutputSlot nextSlot = succ.getOutputSlots().get(0);
                                int pos = 0;
                                if (succ.getProperties().get("con") != null) {
                                    pos = Integer.parseInt(succ.getProperties().get("con"));
                                }
                                OutputSlot slot = f.createOutputSlot(pos);
                                slot.setName(succ.getProperties().get("dump_spec"));
                                if (succ.getProperties().get("short_name") != null) {
                                    slot.setShortName(succ.getProperties().get("short_name"));
                                } else {
                                    String s = succ.getProperties().get("dump_spec");
                                    if (s != null && s.length() <= 2) {
                                        slot.setShortName(s);
                                    } else {
                                        String tmpName = succ.getProperties().get("name");
                                        if (tmpName != null && tmpName.length() > 0) {
                                            slot.setShortName(tmpName.substring(0, 1));
                                        }
                                    }
                                }
View Full Code Here

                        StringBuilder sb = new StringBuilder();
                        List<Connection> conns = is.getConnections();
                        for (int i = 0; i < conns.size(); i++) {
                            Connection c = conns.get(i);
                            OutputSlot os = c.getOutputSlot();
                            Figure pred = os.getFigure();
                            if (i != 0) {
                                sb.append("<BR>");
                            }
                            sb.append(pred.getLines()[0]);
                        }
                        is.removeAllConnections();
                        is.setShortName("X");
                        is.setName(sb.toString());
                        last.add(is);
View Full Code Here

TOP

Related Classes of com.sun.hotspot.igv.graph.Figure

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.