Klasse Vertex

java.lang.Object
visualizationElements.Vertex

public class Vertex extends Object
Represents a vertex of a graph to visualize.
  • Felddetails

    • DEFAULT_MARKING

      private static final String DEFAULT_MARKING
      Siehe auch:
    • DEFAULT_COLOR

      private static final Color DEFAULT_COLOR
    • VERTEX_DIAMETER

      private final int VERTEX_DIAMETER
      Siehe auch:
    • xpos

      private int xpos
    • ypos

      private int ypos
    • marking

      private String marking
    • color

      private Color color
  • Konstruktordetails

    • Vertex

      public Vertex(int xpos, int ypos, String marking, Color color)
      Creates a new Vertex.
      Parameter:
      xpos - X-Position of the vertex.
      ypos - Y-Position of the vertex.
      marking - The marking of the vertex.
      color - Color the vertex is showed.
    • Vertex

      public Vertex(int xpos, int ypos, Color color)
      Creates a new Vertex without marking.
      Parameter:
      xpos - X-Position of the vertex.
      ypos - Y-Position of the vertex.
      color - Color the vertex is showed.
    • Vertex

      public Vertex(int xpos, int ypos, String marking)
      Creates a new black Vertex.
      Parameter:
      xpos - X-Position of the vertex.
      ypos - Y-Position of the vertex.
      marking - The marking of the vertex.
    • Vertex

      public Vertex(int xpos, int ypos)
      Creates a new black Vertex without marking.
      Parameter:
      xpos - X-Position of the vertex.
      ypos - Y-Position of the vertex.
  • Methodendetails

    • setYpos

      public void setYpos(int ypos)
      Parameter:
      ypos - the y position to set
    • getYpos

      public int getYpos()
      Gibt zurück:
      the y position
    • setXpos

      public void setXpos(int xpos)
      Parameter:
      xpos - the x position to set
    • getXpos

      public int getXpos()
      Gibt zurück:
      the x position
    • setColor

      public void setColor(Color color)
      Parameter:
      color - the color to set
    • getColor

      public Color getColor()
      Gibt zurück:
      the color
    • setMarking

      public void setMarking(String marking)
      Parameter:
      marking -
    • getMarking

      public String getMarking()
      Gibt zurück:
      the marking
    • getVertexDiameter

      public int getVertexDiameter()
      Gibt zurück:
      the vERTEX_DIAMETER
    • draw

      public void draw(Graphics g)
      Draws the vertex.
      Parameter:
      g - Graphics object to draw to the DrawArea