package org.ufcspa.simdecs.diagram.elements; import java.util.List; import java.util.Locale; public abstract class Node extends Element { private String currentImage; private int position; public Node(String messageBundle, Locale locale) { super(messageBundle, locale); } public boolean isInternal() { return false; } public abstract String getImage(); public abstract String getImageWithLink(); public abstract List getGrantedPrevious(); public abstract boolean isFirst(); public abstract List getGrantedSwimLanes(); public abstract String getName(); public boolean isGrantedOnThisSwimLane(SwimLane swimLane) { for (SwimLane x : getGrantedSwimLanes()) { if (x.getClass().equals(swimLane.getClass())) return true; } return false; } public boolean isGrantedAfterThisNode(Node node) { for (Node x : getGrantedPrevious()) { if (x.getClass().equals(node.getClass())) return true; } return false; } public String getCurrentImage() { return currentImage; } public void setCurrentImage(String currentImage) { this.currentImage = currentImage; } public int getPosition() { return position; } public void setPosition(int position) { this.position = position; } }