ClusterEdge.java revision 8346:d3413c4fee16
135538Sjb/* 235538Sjb * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 335538Sjb * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 435538Sjb * 535538Sjb * This code is free software; you can redistribute it and/or modify it 635538Sjb * under the terms of the GNU General Public License version 2 only, as 735538Sjb * published by the Free Software Foundation. 835538Sjb * 935538Sjb * This code is distributed in the hope that it will be useful, but WITHOUT 1035538Sjb * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1135538Sjb * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1235538Sjb * version 2 for more details (a copy is included in the LICENSE file that 1335538Sjb * accompanied this code). 1435538Sjb * 1535538Sjb * You should have received a copy of the GNU General Public License version 1635538Sjb * 2 along with this work; if not, write to the Free Software Foundation, 1735538Sjb * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1835538Sjb * 1935538Sjb * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2035538Sjb * or visit www.oracle.com if you need additional information or have any 2135538Sjb * questions. 2235538Sjb * 2335538Sjb */ 2435538Sjbpackage com.sun.hotspot.igv.hierarchicallayout; 2535538Sjb 2635538Sjbimport com.sun.hotspot.igv.layout.Link; 2735538Sjbimport com.sun.hotspot.igv.layout.Port; 2835538Sjbimport java.awt.Point; 2935538Sjbimport java.util.List; 3035538Sjb 3135538Sjb/** 3235538Sjb * 3335538Sjb * @author Thomas Wuerthinger 3450476Speter */ 3535538Sjbpublic class ClusterEdge implements Link { 36174112Sdeischen 3735538Sjb private ClusterNode from; 38113657Sdeischen private ClusterNode to; 39103388Smini private List<Point> points; 40113942Sdeischen 41139023Sdeischen public ClusterEdge(ClusterNode from, ClusterNode to) { 4235538Sjb assert from != null; 4335538Sjb assert to != null; 44113942Sdeischen this.from = from; 45113942Sdeischen this.to = to; 4635538Sjb } 47113657Sdeischen 48113657Sdeischen public Port getTo() { 49113657Sdeischen return to.getInputSlot(); 50113657Sdeischen } 51113942Sdeischen 52113942Sdeischen public Port getFrom() { 53113657Sdeischen return from.getInputSlot(); 54113657Sdeischen } 55113657Sdeischen 56113657Sdeischen public void setControlPoints(List<Point> p) { 57113657Sdeischen this.points = p; 58113657Sdeischen } 5935538Sjb 6035538Sjb public List<Point> getControlPoints() { 61 return points; 62 } 63 64 public boolean isVIP() { 65 return false; 66 } 67} 68