com.sun.hotspot.igv.layout.Port Java Examples

The following examples show how to use com.sun.hotspot.igv.layout.Port. 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: HierarchicalGraphLayout.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public VertexWrapper(N node, UniversalGraph<N, E> graph) {
    this.node = node;
    this.graph = graph;
    final VertexWrapper vertex = this;
    this.slot = new Port() {

        public Vertex getVertex() {
            return vertex;
        }

        public Point getRelativePosition() {
            return new Point((int) (vertex.getSize().getWidth() / 2), (int) (vertex.getSize().getHeight() / 2));
        }
    };

    Widget w = graph.getScene().findWidget(node);
    this.position = w.getPreferredLocation();
}
 
Example #2
Source File: HierarchicalGraphLayout.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public VertexWrapper(N node, UniversalGraph<N, E> graph) {
    this.node = node;
    this.graph = graph;
    final VertexWrapper vertex = this;
    this.slot = new Port() {

        public Vertex getVertex() {
            return vertex;
        }

        public Point getRelativePosition() {
            return new Point((int) (vertex.getSize().getWidth() / 2), (int) (vertex.getSize().getHeight() / 2));
        }
    };

    Widget w = graph.getScene().findWidget(node);
    this.position = w.getPreferredLocation();
}
 
Example #3
Source File: HierarchicalGraphLayout.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public VertexWrapper(N node, UniversalGraph<N, E> graph) {
    this.node = node;
    this.graph = graph;
    final VertexWrapper vertex = this;
    this.slot = new Port() {

        public Vertex getVertex() {
            return vertex;
        }

        public Point getRelativePosition() {
            return new Point((int) (vertex.getSize().getWidth() / 2), (int) (vertex.getSize().getHeight() / 2));
        }
    };

    Widget w = graph.getScene().findWidget(node);
    this.position = w.getPreferredLocation();
}
 
Example #4
Source File: ClusterNode.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void updateSize() {


        calculateSize();

        final ClusterNode widget = this;
        inputSlot = new Port() {

            public Point getRelativePosition() {
                return new Point(size.width / 2, 0);
            }

            public Vertex getVertex() {
                return widget;
            }
        };

        outputSlot = new Port() {

            public Point getRelativePosition() {
                return new Point(size.width / 2, size.height);
            }

            public Vertex getVertex() {
                return widget;
            }
        };
    }
 
Example #5
Source File: OldHierarchicalLayoutManager.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private int addReversedPort(Port p) {
    if (reversePositions.containsKey(p)) {
        return reversePositions.get(p);
    } else {
        width += OFFSET;
        reversePositions.put(p, width);
        return width;
    }
}
 
Example #6
Source File: BlockWidget.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of BlockWidget */
public BlockWidget(ControlFlowScene scene, InputBlock block) {
    super(scene);
    this.block = block;
    this.setLabel(block.getName());
    this.setForeground(NORMAL_FOREGROUND_COLOR);
    this.setBorder(BorderFactory.createLineBorder(1, NORMAL_FOREGROUND_COLOR));
    this.setMinimumSize(SIZE);
    this.setMaximumSize(SIZE);

    this.setFont(font);

    final BlockWidget widget = this;
    inputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point((int) (SIZE.getWidth() / 2), (int) (SIZE.getHeight() / 2));
        }

        public Vertex getVertex() {
            return widget;
        }
    };

    outputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point((int) (SIZE.getWidth() / 2), (int) (SIZE.getHeight() / 2));
        }

        public Vertex getVertex() {
            return widget;
        }
    };
}
 
Example #7
Source File: ClusterNode.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void updateSize() {


        calculateSize();

        final ClusterNode widget = this;
        inputSlot = new Port() {

            public Point getRelativePosition() {
                return new Point(size.width / 2, 0);
            }

            public Vertex getVertex() {
                return widget;
            }
        };

        outputSlot = new Port() {

            public Point getRelativePosition() {
                return new Point(size.width / 2, size.height);
            }

            public Vertex getVertex() {
                return widget;
            }
        };
    }
 
Example #8
Source File: BlockWidget.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of BlockWidget */
public BlockWidget(ControlFlowScene scene, InputBlock block) {
    super(scene);
    this.block = block;
    this.setLabel(block.getName());
    this.setForeground(NORMAL_FOREGROUND_COLOR);
    this.setBorder(BorderFactory.createLineBorder(1, NORMAL_FOREGROUND_COLOR));
    this.setMinimumSize(SIZE);
    this.setMaximumSize(SIZE);

    this.setFont(font);

    final BlockWidget widget = this;
    inputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point((int) (SIZE.getWidth() / 2), (int) (SIZE.getHeight() / 2));
        }

        public Vertex getVertex() {
            return widget;
        }
    };

    outputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point((int) (SIZE.getWidth() / 2), (int) (SIZE.getHeight() / 2));
        }

        public Vertex getVertex() {
            return widget;
        }
    };
}
 
Example #9
Source File: ClusterNode.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void updateSize() {


        calculateSize();

        final ClusterNode widget = this;
        inputSlot = new Port() {

            public Point getRelativePosition() {
                return new Point(size.width / 2, 0);
            }

            public Vertex getVertex() {
                return widget;
            }
        };

        outputSlot = new Port() {

            public Point getRelativePosition() {
                return new Point(size.width / 2, size.height);
            }

            public Vertex getVertex() {
                return widget;
            }
        };
    }
 
Example #10
Source File: OldHierarchicalLayoutManager.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private int addReversedPort(Port p) {
    if (reversePositions.containsKey(p)) {
        return reversePositions.get(p);
    } else {
        width += OFFSET;
        reversePositions.put(p, width);
        return width;
    }
}
 
Example #11
Source File: BlockWidget.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of BlockWidget */
public BlockWidget(ControlFlowScene scene, InputBlock block) {
    super(scene);
    this.block = block;
    this.setLabel(block.getName());
    this.setForeground(NORMAL_FOREGROUND_COLOR);
    this.setBorder(BorderFactory.createLineBorder(1, NORMAL_FOREGROUND_COLOR));
    this.setMinimumSize(SIZE);
    this.setMaximumSize(SIZE);

    this.setFont(font);

    final BlockWidget widget = this;
    inputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point((int) (SIZE.getWidth() / 2), (int) (SIZE.getHeight() / 2));
        }

        public Vertex getVertex() {
            return widget;
        }
    };

    outputSlot = new Port() {

        public Point getRelativePosition() {
            return new Point((int) (SIZE.getWidth() / 2), (int) (SIZE.getHeight() / 2));
        }

        public Vertex getVertex() {
            return widget;
        }
    };
}
 
Example #12
Source File: OldHierarchicalLayoutManager.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private int addReversedPort(Port p) {
    if (reversePositions.containsKey(p)) {
        return reversePositions.get(p);
    } else {
        width += OFFSET;
        reversePositions.put(p, width);
        return width;
    }
}
 
Example #13
Source File: ClusterOutgoingConnection.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Port getTo() {
    return inputSlot;
}
 
Example #14
Source File: ClusterNode.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Port getOutputSlot() {
    return outputSlot;
}
 
Example #15
Source File: Connection.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Port getFrom() {
    return outputSlot;
}
 
Example #16
Source File: ClusterOutgoingConnection.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Port getTo() {
    return inputSlot;
}
 
Example #17
Source File: ClusterOutputSlotNode.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Port getOutputSlot() {
    return outputSlot;
}
 
Example #18
Source File: ClusterOutputSlotNode.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Port getInputSlot() {
    return inputSlot;
}
 
Example #19
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 #20
Source File: BlockConnectionWidget.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Port getFrom() {
    return outputSlot;
}
 
Example #21
Source File: InterClusterConnection.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Port getFrom() {
    return outputSlot;
}
 
Example #22
Source File: InterClusterConnection.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Port getFrom() {
    return outputSlot;
}
 
Example #23
Source File: ClusterIngoingConnection.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Port getFrom() {
    return outputSlot;
}
 
Example #24
Source File: ClusterIngoingConnection.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Port getTo() {
    return inputSlot;
}
 
Example #25
Source File: ClusterIngoingConnection.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Port getTo() {
    return inputSlot;
}
 
Example #26
Source File: ClusterEdge.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Port getFrom() {
    return from.getInputSlot();
}
 
Example #27
Source File: ClusterEdge.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Port getTo() {
    return to.getInputSlot();
}
 
Example #28
Source File: ClusterNode.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Port getOutputSlot() {
    return outputSlot;
}
 
Example #29
Source File: ClusterIngoingConnection.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Port getFrom() {
    return outputSlot;
}
 
Example #30
Source File: HierarchicalGraphLayout.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Port getFrom() {
    return from.getSlot();
}