java.lang.Object
ch.ladestation.connectncharge.pui.Component
ch.ladestation.connectncharge.model.game.gamelogic.Segment
Direct Known Subclasses:
Edge, Node

public abstract class Segment extends Component
  • Constructor Details

    • Segment

      public Segment(int segmentIndex, int startIndex, int endIndex, Color color)
      Basic constructor for the Edge class
      Parameters:
      segmentIndex -
      startIndex - the start pixel of the edge.
      endIndex - the end pixel of the edge
      color - the color this segment will be visualized with
  • Method Details

    • setActiveEdgesRef

      public static void setActiveEdgesRef(ObservableArray<Edge> ref)
    • setActiveTerminalsRef

      public static void setActiveTerminalsRef(ObservableArray<Node> ref)
    • activeTerminalsContains

      protected static boolean activeTerminalsContains(Node node)
    • activeEdgesContains

      protected static boolean activeEdgesContains(Edge edge)
    • getStartIndex

      public int getStartIndex()
    • getEndIndex

      public int getEndIndex()
    • getColor

      public Color getColor()
    • setColor

      public void setColor(Color color)
    • isOn

      public abstract boolean isOn()
    • getSegmentIndex

      public int getSegmentIndex()