@Test public void testSetXYPositionMap() { n1.setXYPositionMap(new Point2D.Double(1,2)); assertEquals(n1.getXYPositionMap() , new java.awt.geom.Point2D.Double(1,2)); }
public void setXYPositionMap(Point2D pos , String ...layout) { checkAttachedToNetPlanObject(); if (layout.length > 1) throw new Net2PlanException ("At most one layout can be set"); netPlan.checkIsModifiable(); if (layout.length == 0) this.mapLayout2NodeXYPositionMap.put(netPlan.getPlotNodeLayoutCurrentlyActive() , new UnmodifiablePoint2D (pos.getX() , pos.getY())); else { if (!netPlan.cache_definedPlotNodeLayouts.contains(layout [0])) throw new Net2PlanException ("The layout *" + (layout[0]) + "* does not exist. Current layouts: " + netPlan.cache_definedPlotNodeLayouts); this.mapLayout2NodeXYPositionMap.put(layout [0] , new UnmodifiablePoint2D (pos.getX() , pos.getY())); } }
Node extends NetworkElement { public void setXYPositionMap(Point2D pos , String ...layout) { checkAttachedToNetPlanObject(); if (layout.length > 1) throw new Net2PlanException ("At most one layout can be set"); netPlan.checkIsModifiable(); if (layout.length == 0) this.mapLayout2NodeXYPositionMap.put(netPlan.getPlotNodeLayoutCurrentlyActive() , new UnmodifiablePoint2D (pos.getX() , pos.getY())); else { if (!netPlan.cache_definedPlotNodeLayouts.contains(layout [0])) throw new Net2PlanException ("The layout *" + (layout[0]) + "* does not exist. Current layouts: " + netPlan.cache_definedPlotNodeLayouts); this.mapLayout2NodeXYPositionMap.put(layout [0] , new UnmodifiablePoint2D (pos.getX() , pos.getY())); } } }
Node extends NetworkElement { public void setXYPositionMap(Point2D pos , String ...layout) { checkAttachedToNetPlanObject(); if (layout.length > 1) throw new Net2PlanException ("At most one layout can be set"); netPlan.checkIsModifiable(); if (layout.length == 0) this.mapLayout2NodeXYPositionMap.put(netPlan.getPlotNodeLayoutCurrentlyActive() , new UnmodifiablePoint2D (pos.getX() , pos.getY())); else { if (!netPlan.cache_definedPlotNodeLayouts.contains(layout [0])) throw new Net2PlanException ("The layout *" + (layout[0]) + "* does not exist. Current layouts: " + netPlan.cache_definedPlotNodeLayouts); this.mapLayout2NodeXYPositionMap.put(layout [0] , new UnmodifiablePoint2D (pos.getX() , pos.getY())); } } protected  Node(NetPlan netPlan , long id , int index , double xCoord, double yCoord, String name, AttributeMap attributes); }
Node extends NetworkElement { public void setXYPositionMap(Point2D pos , String ...layout) { checkAttachedToNetPlanObject(); if (layout.length > 1) throw new Net2PlanException ("At most one layout can be set"); netPlan.checkIsModifiable(); if (layout.length == 0) this.mapLayout2NodeXYPositionMap.put(netPlan.getPlotNodeLayoutCurrentlyActive() , new UnmodifiablePoint2D (pos.getX() , pos.getY())); else { if (!netPlan.cache_definedPlotNodeLayouts.contains(layout [0])) throw new Net2PlanException ("The layout *" + (layout[0]) + "* does not exist. Current layouts: " + netPlan.cache_definedPlotNodeLayouts); this.mapLayout2NodeXYPositionMap.put(layout [0] , new UnmodifiablePoint2D (pos.getX() , pos.getY())); } } protected  Node(NetPlan netPlan , long id , int index , double xCoord, double yCoord, String name, AttributeMap attributes); void setSiteName(String site); String getSiteName(); void setPopulation(double population); double getPopulation(); double getEgressOfferedTraffic(NetworkLayer ... optionalLayerParameter); double getIncomingLinksTraffic(NetworkLayer ... optionalLayerParameter); double getOutgoingLinksTraffic(NetworkLayer ... optionalLayerParameter); double getIncomingLinksCapacity(NetworkLayer ... optionalLayerParameter); double getOutgoingLinksCapacity(NetworkLayer ... optionalLayerParameter); double getIngressOfferedTraffic(NetworkLayer ... optionalLayerParameter); double getEgressOfferedMulticastTraffic(NetworkLayer ... optionalLayerParameter); double getIngressOfferedMulticastTraffic(NetworkLayer ... optionalLayerParameter); void removeAllForwardingRules(NetworkLayer ... optionalLayerParameter); double getEgressCarriedTraffic(NetworkLayer ... optionalLayerParameter); double getIngressCarriedTraffic(NetworkLayer ... optionalLayerParameter); double getEgressCarriedMulticastTraffic(NetworkLayer ... optionalLayerParameter); double getIngressCarriedMulticastTraffic(NetworkLayer ... optionalLayerParameter); SortedSet<Node> getInNeighbors(NetworkLayer ... optionalLayerParameter); SortedSet<Node> getOutNeighbors(NetworkLayer ... optionalLayerParameter); SortedSet<Node> getOutNeighborsAllLayers(); SortedSet<Node> getInNeighborsAllLayers(); Point2D getXYPositionMap(String ...layout); void setXYPositionMap(Point2D pos , String ...layout); boolean isUp(); boolean isDown(); SortedSet<Link> getIncomingLinks(NetworkLayer ... optionalLayerParameter); SortedSet<NetworkLayer> getWorkingLayers(); boolean isWorkingAtLayer(NetworkLayer layer); boolean isIsolated(); SortedSet<Link> getOutgoingLinks(NetworkLayer ... optionalLayerParameter); SortedSet<Link> getOutgoingLinksAllLayers(); SortedSet<Link> getIncomingLinksAllLayers(); SortedSet<Demand> getOutgoingDemandsAllLayers(); SortedSet<Demand> getIncomingDemandsAllLayers(); SortedSet<MulticastDemand> getOutgoingMulticastDemandsAllLayers(); SortedSet<MulticastDemand> getIncomingMulticastDemandsAllLayers(); SortedSet<Demand> getIncomingDemands(NetworkLayer ... optionalLayerParameter); boolean setFailureState(boolean setAsUp); SortedSet<Route> getIncomingRoutes(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastTree> getIncomingMulticastTrees(NetworkLayer ... optionalLayerParameter); SortedSet<Route> getOutgoingRoutes(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastTree> getOutgoingMulticastTrees(NetworkLayer ... optionalLayerParameter); SortedSet<Demand> getOutgoingDemands(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastDemand> getIncomingMulticastDemands(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastDemand> getOutgoingMulticastDemands(NetworkLayer ... optionalLayerParameter); SortedSet<Route> getAssociatedRoutes(NetworkLayer ... optionalLayerParameter); SortedSet<Route> getExpressRoutes(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastTree> getAssociatedMulticastTrees(NetworkLayer ... optionalLayerParameter); SortedSet<SharedRiskGroup> getSRGs(); SortedSet<Resource> getResources(String ... type); void remove(); @Override String toString(); SortedMap<Pair<Demand,Link>,Double> getForwardingRules(NetworkLayer ... optionalLayerParameter); SortedMap<Pair<Demand,Link>,Double> getForwardingRules(Demand demand); URL getUrlNodeIcon(NetworkLayer layer); double getNodeIconRelativeSize(NetworkLayer layer); void setUrlNodeIcon(NetworkLayer layer , URL url , Double relativeSize); void removeUrlNodeIcon(NetworkLayer layer); SortedSet<String> getPlanningDomains(); void removeFromPlanningDomain(String planningDomain); void addToPlanningDomain(String planningDomain); }
Node extends NetworkElement { public void setXYPositionMap(Point2D pos , String ...layout) { checkAttachedToNetPlanObject(); if (layout.length > 1) throw new Net2PlanException ("At most one layout can be set"); netPlan.checkIsModifiable(); if (layout.length == 0) this.mapLayout2NodeXYPositionMap.put(netPlan.getPlotNodeLayoutCurrentlyActive() , new UnmodifiablePoint2D (pos.getX() , pos.getY())); else { if (!netPlan.cache_definedPlotNodeLayouts.contains(layout [0])) throw new Net2PlanException ("The layout *" + (layout[0]) + "* does not exist. Current layouts: " + netPlan.cache_definedPlotNodeLayouts); this.mapLayout2NodeXYPositionMap.put(layout [0] , new UnmodifiablePoint2D (pos.getX() , pos.getY())); } } protected  Node(NetPlan netPlan , long id , int index , double xCoord, double yCoord, String name, AttributeMap attributes); void setSiteName(String site); String getSiteName(); void setPopulation(double population); double getPopulation(); double getEgressOfferedTraffic(NetworkLayer ... optionalLayerParameter); double getIncomingLinksTraffic(NetworkLayer ... optionalLayerParameter); double getOutgoingLinksTraffic(NetworkLayer ... optionalLayerParameter); double getIncomingLinksCapacity(NetworkLayer ... optionalLayerParameter); double getOutgoingLinksCapacity(NetworkLayer ... optionalLayerParameter); double getIngressOfferedTraffic(NetworkLayer ... optionalLayerParameter); double getEgressOfferedMulticastTraffic(NetworkLayer ... optionalLayerParameter); double getIngressOfferedMulticastTraffic(NetworkLayer ... optionalLayerParameter); void removeAllForwardingRules(NetworkLayer ... optionalLayerParameter); double getEgressCarriedTraffic(NetworkLayer ... optionalLayerParameter); double getIngressCarriedTraffic(NetworkLayer ... optionalLayerParameter); double getEgressCarriedMulticastTraffic(NetworkLayer ... optionalLayerParameter); double getIngressCarriedMulticastTraffic(NetworkLayer ... optionalLayerParameter); SortedSet<Node> getInNeighbors(NetworkLayer ... optionalLayerParameter); SortedSet<Node> getOutNeighbors(NetworkLayer ... optionalLayerParameter); SortedSet<Node> getOutNeighborsAllLayers(); SortedSet<Node> getInNeighborsAllLayers(); Point2D getXYPositionMap(String ...layout); void setXYPositionMap(Point2D pos , String ...layout); boolean isUp(); boolean isDown(); SortedSet<Link> getIncomingLinks(NetworkLayer ... optionalLayerParameter); SortedSet<NetworkLayer> getWorkingLayers(); boolean isWorkingAtLayer(NetworkLayer layer); boolean isIsolated(); SortedSet<Link> getOutgoingLinks(NetworkLayer ... optionalLayerParameter); SortedSet<Link> getOutgoingLinksAllLayers(); SortedSet<Link> getIncomingLinksAllLayers(); SortedSet<Demand> getOutgoingDemandsAllLayers(); SortedSet<Demand> getIncomingDemandsAllLayers(); SortedSet<MulticastDemand> getOutgoingMulticastDemandsAllLayers(); SortedSet<MulticastDemand> getIncomingMulticastDemandsAllLayers(); SortedSet<Demand> getIncomingDemands(NetworkLayer ... optionalLayerParameter); boolean setFailureState(boolean setAsUp); SortedSet<Route> getIncomingRoutes(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastTree> getIncomingMulticastTrees(NetworkLayer ... optionalLayerParameter); SortedSet<Route> getOutgoingRoutes(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastTree> getOutgoingMulticastTrees(NetworkLayer ... optionalLayerParameter); SortedSet<Demand> getOutgoingDemands(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastDemand> getIncomingMulticastDemands(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastDemand> getOutgoingMulticastDemands(NetworkLayer ... optionalLayerParameter); SortedSet<Route> getAssociatedRoutes(NetworkLayer ... optionalLayerParameter); SortedSet<Route> getExpressRoutes(NetworkLayer ... optionalLayerParameter); SortedSet<MulticastTree> getAssociatedMulticastTrees(NetworkLayer ... optionalLayerParameter); SortedSet<SharedRiskGroup> getSRGs(); SortedSet<Resource> getResources(String ... type); void remove(); @Override String toString(); SortedMap<Pair<Demand,Link>,Double> getForwardingRules(NetworkLayer ... optionalLayerParameter); SortedMap<Pair<Demand,Link>,Double> getForwardingRules(Demand demand); URL getUrlNodeIcon(NetworkLayer layer); double getNodeIconRelativeSize(NetworkLayer layer); void setUrlNodeIcon(NetworkLayer layer , URL url , Double relativeSize); void removeUrlNodeIcon(NetworkLayer layer); SortedSet<String> getPlanningDomains(); void removeFromPlanningDomain(String planningDomain); void addToPlanningDomain(String planningDomain);  }