IntermediateCalculationCable.java 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package model;
  2. import classes.AbstractCanvasObject;
  3. import classes.Edge;
  4. import classes.GroupNode;
  5. /**
  6. * A VisualRepresentation to represent a connection from a UpperNode to a AbstactCpsObject, but actually the UpperNode is not connected.
  7. * @author Tom
  8. *
  9. */
  10. public class IntermediateCalculationCable {
  11. private AbstractCanvasObject outsideObject;
  12. private AbstractCanvasObject insideObject;
  13. private GroupNode getInsideUpperNode;
  14. private GroupNode getOutsideUpperNode;
  15. private DecoratedCable cable;
  16. public IntermediateCalculationCable(DecoratedCable cable, GroupNode getInsideUpperNode,GroupNode getOutsideUpperNode, AbstractCanvasObject insideObject, AbstractCanvasObject outsideObject){
  17. this.cable = cable;
  18. this.getInsideUpperNode = getInsideUpperNode;
  19. this.getOutsideUpperNode = getOutsideUpperNode;
  20. this.insideObject = insideObject;
  21. this.outsideObject = outsideObject;
  22. }
  23. public AbstractCanvasObject getOusideObject() {
  24. return outsideObject;
  25. }
  26. public AbstractCanvasObject getInsideObject() {
  27. return insideObject;
  28. }
  29. public GroupNode getInsideUpperNode() {
  30. return getInsideUpperNode;
  31. }
  32. public DecoratedCable getCable() {
  33. return cable;
  34. }
  35. public Edge getModel() {
  36. return cable.getModel();
  37. }
  38. public GroupNode getOutsideUpperNode() {
  39. return getOutsideUpperNode;
  40. }
  41. public String toString() {
  42. return getModel().toString();
  43. }
  44. }