Java Code Examples for com.sun.hotspot.igv.layout.Vertex#getPosition()

The following examples show how to use com.sun.hotspot.igv.layout.Vertex#getPosition() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClusterNode.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void setPosition(Point pos) {

        this.position = pos;
        for (Vertex n : subNodes) {
            Point cur = new Point(n.getPosition());
            cur.translate(pos.x + BORDER, pos.y + BORDER);
            n.setPosition(cur);
        }

        for (Link e : subEdges) {
            List<Point> arr = e.getControlPoints();
            ArrayList<Point> newArr = new ArrayList<Point>();
            for (Point p : arr) {
                if (p != null) {
                    Point p2 = new Point(p);
                    p2.translate(pos.x + BORDER, pos.y + BORDER);
                    newArr.add(p2);
                } else {
                    newArr.add(null);
                }
            }

            e.setControlPoints(newArr);
        }
    }
 
Example 2
Source File: ClusterNode.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void setPosition(Point pos) {

        this.position = pos;
        for (Vertex n : subNodes) {
            Point cur = new Point(n.getPosition());
            cur.translate(pos.x + BORDER, pos.y + BORDER);
            n.setPosition(cur);
        }

        for (Link e : subEdges) {
            List<Point> arr = e.getControlPoints();
            ArrayList<Point> newArr = new ArrayList<Point>();
            for (Point p : arr) {
                if (p != null) {
                    Point p2 = new Point(p);
                    p2.translate(pos.x + BORDER, pos.y + BORDER);
                    newArr.add(p2);
                } else {
                    newArr.add(null);
                }
            }

            e.setControlPoints(newArr);
        }
    }
 
Example 3
Source File: ClusterNode.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public void setPosition(Point pos) {

        this.position = pos;
        for (Vertex n : subNodes) {
            Point cur = new Point(n.getPosition());
            cur.translate(pos.x + BORDER, pos.y + BORDER);
            n.setPosition(cur);
        }

        for (Link e : subEdges) {
            List<Point> arr = e.getControlPoints();
            ArrayList<Point> newArr = new ArrayList<Point>();
            for (Point p : arr) {
                if (p != null) {
                    Point p2 = new Point(p);
                    p2.translate(pos.x + BORDER, pos.y + BORDER);
                    newArr.add(p2);
                } else {
                    newArr.add(null);
                }
            }

            e.setControlPoints(newArr);
        }
    }
 
Example 4
Source File: ClusterNode.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public void setPosition(Point pos) {

        this.position = pos;
        for (Vertex n : subNodes) {
            Point cur = new Point(n.getPosition());
            cur.translate(pos.x + BORDER, pos.y + BORDER);
            n.setPosition(cur);
        }

        for (Link e : subEdges) {
            List<Point> arr = e.getControlPoints();
            ArrayList<Point> newArr = new ArrayList<Point>(arr.size());
            for (Point p : arr) {
                if (p != null) {
                    Point p2 = new Point(p);
                    p2.translate(pos.x + BORDER, pos.y + BORDER);
                    newArr.add(p2);
                } else {
                    newArr.add(null);
                }
            }

            e.setControlPoints(newArr);
        }
    }
 
Example 5
Source File: ClusterNode.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void setPosition(Point pos) {

        this.position = pos;
        for (Vertex n : subNodes) {
            Point cur = new Point(n.getPosition());
            cur.translate(pos.x + BORDER, pos.y + BORDER);
            n.setPosition(cur);
        }

        for (Link e : subEdges) {
            List<Point> arr = e.getControlPoints();
            ArrayList<Point> newArr = new ArrayList<Point>();
            for (Point p : arr) {
                if (p != null) {
                    Point p2 = new Point(p);
                    p2.translate(pos.x + BORDER, pos.y + BORDER);
                    newArr.add(p2);
                } else {
                    newArr.add(null);
                }
            }

            e.setControlPoints(newArr);
        }
    }
 
Example 6
Source File: ClusterNode.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void setPosition(Point pos) {

        this.position = pos;
        for (Vertex n : subNodes) {
            Point cur = new Point(n.getPosition());
            cur.translate(pos.x + BORDER, pos.y + BORDER);
            n.setPosition(cur);
        }

        for (Link e : subEdges) {
            List<Point> arr = e.getControlPoints();
            ArrayList<Point> newArr = new ArrayList<Point>();
            for (Point p : arr) {
                if (p != null) {
                    Point p2 = new Point(p);
                    p2.translate(pos.x + BORDER, pos.y + BORDER);
                    newArr.add(p2);
                } else {
                    newArr.add(null);
                }
            }

            e.setControlPoints(newArr);
        }
    }
 
Example 7
Source File: ClusterNode.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void setPosition(Point pos) {

        this.position = pos;
        for (Vertex n : subNodes) {
            Point cur = new Point(n.getPosition());
            cur.translate(pos.x + BORDER, pos.y + BORDER);
            n.setPosition(cur);
        }

        for (Link e : subEdges) {
            List<Point> arr = e.getControlPoints();
            ArrayList<Point> newArr = new ArrayList<Point>();
            for (Point p : arr) {
                if (p != null) {
                    Point p2 = new Point(p);
                    p2.translate(pos.x + BORDER, pos.y + BORDER);
                    newArr.add(p2);
                } else {
                    newArr.add(null);
                }
            }

            e.setControlPoints(newArr);
        }
    }
 
Example 8
Source File: ClusterNode.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void setPosition(Point pos) {

        this.position = pos;
        for (Vertex n : subNodes) {
            Point cur = new Point(n.getPosition());
            cur.translate(pos.x + BORDER, pos.y + BORDER);
            n.setPosition(cur);
        }

        for (Link e : subEdges) {
            List<Point> arr = e.getControlPoints();
            ArrayList<Point> newArr = new ArrayList<Point>();
            for (Point p : arr) {
                if (p != null) {
                    Point p2 = new Point(p);
                    p2.translate(pos.x + BORDER, pos.y + BORDER);
                    newArr.add(p2);
                } else {
                    newArr.add(null);
                }
            }

            e.setControlPoints(newArr);
        }
    }
 
Example 9
Source File: ClusterOutputSlotNode.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public ClusterOutputSlotNode(ClusterNode n, String id) {
    this.blockNode = n;
    this.id = id;

    n.addSubNode(this);

    final Vertex thisNode = this;
    final ClusterNode thisBlockNode = blockNode;

    inputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point(0, 0);
        }

        public Vertex getVertex() {
            return thisNode;
        }

        @Override
        public String toString() {
            return "InPort of " + thisNode.toString();
        }
    };

    outputSlot = new Port() {

        public Point getRelativePosition() {
            Point p = new Point(thisNode.getPosition());
            p.x += ClusterNode.BORDER;
            p.y = thisBlockNode.getSize().height;
            return p;
        }

        public Vertex getVertex() {
            return thisBlockNode;
        }

        @Override
        public String toString() {
            return "OutPort of " + thisNode.toString();
        }
    };
}
 
Example 10
Source File: ClusterInputSlotNode.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public ClusterInputSlotNode(ClusterNode n, String id) {
    this.blockNode = n;
    this.id = id;

    n.addSubNode(this);

    final Vertex thisNode = this;
    final ClusterNode thisBlockNode = blockNode;

    outputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point(0, 0);
        }

        public Vertex getVertex() {
            return thisNode;
        }

        @Override
        public String toString() {
            return "OutPort of " + thisNode.toString();
        }
    };

    inputSlot = new Port() {

        public Point getRelativePosition() {
            Point p = new Point(thisNode.getPosition());
            p.x += ClusterNode.BORDER;
            p.y = 0;
            return p;
        }

        public Vertex getVertex() {
            return thisBlockNode;
        }

        @Override
        public String toString() {
            return "InPort of " + thisNode.toString();
        }
    };
}
 
Example 11
Source File: ClusterOutputSlotNode.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public ClusterOutputSlotNode(ClusterNode n, String id) {
    this.blockNode = n;
    this.id = id;

    n.addSubNode(this);

    final Vertex thisNode = this;
    final ClusterNode thisBlockNode = blockNode;

    inputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point(0, 0);
        }

        public Vertex getVertex() {
            return thisNode;
        }

        @Override
        public String toString() {
            return "InPort of " + thisNode.toString();
        }
    };

    outputSlot = new Port() {

        public Point getRelativePosition() {
            Point p = new Point(thisNode.getPosition());
            p.x += ClusterNode.BORDER;
            p.y = thisBlockNode.getSize().height;
            return p;
        }

        public Vertex getVertex() {
            return thisBlockNode;
        }

        @Override
        public String toString() {
            return "OutPort of " + thisNode.toString();
        }
    };
}
 
Example 12
Source File: ClusterOutputSlotNode.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public ClusterOutputSlotNode(ClusterNode n, String id) {
    this.blockNode = n;
    this.id = id;

    n.addSubNode(this);

    final Vertex thisNode = this;
    final ClusterNode thisBlockNode = blockNode;

    inputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point(0, 0);
        }

        public Vertex getVertex() {
            return thisNode;
        }

        @Override
        public String toString() {
            return "InPort of " + thisNode.toString();
        }
    };

    outputSlot = new Port() {

        public Point getRelativePosition() {
            Point p = new Point(thisNode.getPosition());
            p.x += ClusterNode.BORDER;
            p.y = thisBlockNode.getSize().height;
            return p;
        }

        public Vertex getVertex() {
            return thisBlockNode;
        }

        @Override
        public String toString() {
            return "OutPort of " + thisNode.toString();
        }
    };
}
 
Example 13
Source File: ClusterInputSlotNode.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public ClusterInputSlotNode(ClusterNode n, String id) {
    this.blockNode = n;
    this.id = id;

    n.addSubNode(this);

    final Vertex thisNode = this;
    final ClusterNode thisBlockNode = blockNode;

    outputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point(0, 0);
        }

        public Vertex getVertex() {
            return thisNode;
        }

        @Override
        public String toString() {
            return "OutPort of " + thisNode.toString();
        }
    };

    inputSlot = new Port() {

        public Point getRelativePosition() {
            Point p = new Point(thisNode.getPosition());
            p.x += ClusterNode.BORDER;
            p.y = 0;
            return p;
        }

        public Vertex getVertex() {
            return thisBlockNode;
        }

        @Override
        public String toString() {
            return "InPort of " + thisNode.toString();
        }
    };
}
 
Example 14
Source File: ClusterOutputSlotNode.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public ClusterOutputSlotNode(ClusterNode n, String id) {
    this.blockNode = n;
    this.id = id;

    n.addSubNode(this);

    final Vertex thisNode = this;
    final ClusterNode thisBlockNode = blockNode;

    inputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point(0, 0);
        }

        public Vertex getVertex() {
            return thisNode;
        }

        @Override
        public String toString() {
            return "InPort of " + thisNode.toString();
        }
    };

    outputSlot = new Port() {

        public Point getRelativePosition() {
            Point p = new Point(thisNode.getPosition());
            p.x += ClusterNode.BORDER;
            p.y = thisBlockNode.getSize().height;
            return p;
        }

        public Vertex getVertex() {
            return thisBlockNode;
        }

        @Override
        public String toString() {
            return "OutPort of " + thisNode.toString();
        }
    };
}
 
Example 15
Source File: ClusterInputSlotNode.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public ClusterInputSlotNode(ClusterNode n, String id) {
    this.blockNode = n;
    this.id = id;

    n.addSubNode(this);

    final Vertex thisNode = this;
    final ClusterNode thisBlockNode = blockNode;

    outputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point(0, 0);
        }

        public Vertex getVertex() {
            return thisNode;
        }

        @Override
        public String toString() {
            return "OutPort of " + thisNode.toString();
        }
    };

    inputSlot = new Port() {

        public Point getRelativePosition() {
            Point p = new Point(thisNode.getPosition());
            p.x += ClusterNode.BORDER;
            p.y = 0;
            return p;
        }

        public Vertex getVertex() {
            return thisBlockNode;
        }

        @Override
        public String toString() {
            return "InPort of " + thisNode.toString();
        }
    };
}
 
Example 16
Source File: ClusterOutputSlotNode.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public ClusterOutputSlotNode(ClusterNode n, String id) {
    this.blockNode = n;
    this.id = id;

    n.addSubNode(this);

    final Vertex thisNode = this;
    final ClusterNode thisBlockNode = blockNode;

    inputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point(0, 0);
        }

        public Vertex getVertex() {
            return thisNode;
        }

        @Override
        public String toString() {
            return "InPort of " + thisNode.toString();
        }
    };

    outputSlot = new Port() {

        public Point getRelativePosition() {
            Point p = new Point(thisNode.getPosition());
            p.x += ClusterNode.BORDER;
            p.y = 0;//thisBlockNode.getSize().height;
            return p;
        }

        public Vertex getVertex() {
            return thisBlockNode;
        }

        @Override
        public String toString() {
            return "OutPort of " + thisNode.toString();
        }
    };
}
 
Example 17
Source File: ClusterInputSlotNode.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public ClusterInputSlotNode(ClusterNode n, String id) {
    this.blockNode = n;
    this.id = id;

    n.addSubNode(this);

    final Vertex thisNode = this;
    final ClusterNode thisBlockNode = blockNode;

    outputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point(0, 0);
        }

        public Vertex getVertex() {
            return thisNode;
        }

        @Override
        public String toString() {
            return "OutPort of " + thisNode.toString();
        }
    };

    inputSlot = new Port() {

        public Point getRelativePosition() {
            Point p = new Point(thisNode.getPosition());
            p.x += ClusterNode.BORDER;
            p.y = 0;
            return p;
        }

        public Vertex getVertex() {
            return thisBlockNode;
        }

        @Override
        public String toString() {
            return "InPort of " + thisNode.toString();
        }
    };
}
 
Example 18
Source File: ClusterInputSlotNode.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public ClusterInputSlotNode(ClusterNode n, String id) {
    this.blockNode = n;
    this.id = id;

    n.addSubNode(this);

    final Vertex thisNode = this;
    final ClusterNode thisBlockNode = blockNode;

    outputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point(0, 0);
        }

        public Vertex getVertex() {
            return thisNode;
        }

        @Override
        public String toString() {
            return "OutPort of " + thisNode.toString();
        }
    };

    inputSlot = new Port() {

        public Point getRelativePosition() {
            Point p = new Point(thisNode.getPosition());
            p.x += ClusterNode.BORDER;
            p.y = 0;
            return p;
        }

        public Vertex getVertex() {
            return thisBlockNode;
        }

        @Override
        public String toString() {
            return "InPort of " + thisNode.toString();
        }
    };
}
 
Example 19
Source File: ClusterOutputSlotNode.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public ClusterOutputSlotNode(ClusterNode n, String id) {
    this.blockNode = n;
    this.id = id;

    n.addSubNode(this);

    final Vertex thisNode = this;
    final ClusterNode thisBlockNode = blockNode;

    inputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point(0, 0);
        }

        public Vertex getVertex() {
            return thisNode;
        }

        @Override
        public String toString() {
            return "InPort of " + thisNode.toString();
        }
    };

    outputSlot = new Port() {

        public Point getRelativePosition() {
            Point p = new Point(thisNode.getPosition());
            p.x += ClusterNode.BORDER;
            p.y = thisBlockNode.getSize().height;
            return p;
        }

        public Vertex getVertex() {
            return thisBlockNode;
        }

        @Override
        public String toString() {
            return "OutPort of " + thisNode.toString();
        }
    };
}
 
Example 20
Source File: ClusterInputSlotNode.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public ClusterInputSlotNode(ClusterNode n, String id) {
    this.blockNode = n;
    this.id = id;

    n.addSubNode(this);

    final Vertex thisNode = this;
    final ClusterNode thisBlockNode = blockNode;

    outputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point(0, 0);
        }

        public Vertex getVertex() {
            return thisNode;
        }

        @Override
        public String toString() {
            return "OutPort of " + thisNode.toString();
        }
    };

    inputSlot = new Port() {

        public Point getRelativePosition() {
            Point p = new Point(thisNode.getPosition());
            p.x += ClusterNode.BORDER;
            p.y = 0;
            return p;
        }

        public Vertex getVertex() {
            return thisBlockNode;
        }

        @Override
        public String toString() {
            return "InPort of " + thisNode.toString();
        }
    };
}