Package com.sun.hotspot.igv.graph

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


        return connection;
    }

    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 {
        LineGenerator lg = (LineGenerator)Class.forName(className).newInstance();
View Full Code Here


                        }

                        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));
                                        }
                                    }
                                }
                                for (Connection c : nextSlot.getConnections()) {
                                    Connection newConn = diagram.createConnection(c.getInputSlot(), slot);
                                    newConn.setColor(c.getColor());
                                    newConn.setStyle(c.getStyle());
                                }


                                figuresToRemove.add(succ);
View Full Code Here

                for (InputSlot is : f.getInputSlots()) {
                    if (z >= r.getStartingIndex() && z <= r.getEndIndex() && is.getConnections().size() > 0) {
                        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]);
View Full Code Here

TOP

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

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.