All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ConflictGraphPanel extends GraphPanel
Panel for visualizing a conflict graph with vertices and edges. Extends GraphPanel and implements methods for specific conflict graph visualization.
See Also:
  • Constructor Details

    • ConflictGraphPanel

      public ConflictGraphPanel(ConflictGraph conflictGraph)
      Constructs a ConflictGraphPanel with the specified ConflictGraph.
      Parameters:
      conflictGraph - The ConflictGraph object representing the graph to visualize
  • Method Details

    • calculateVertexPositions

      protected void calculateVertexPositions()
      Calculates positions of vertices around a circle for ConflictGraph visualization.
      Specified by:
      calculateVertexPositions in class GraphPanel
    • drawEdges

      protected void drawEdges(Graphics2D g2d)
      Draws edges between vertices of the ConflictGraph.
      Specified by:
      drawEdges in class GraphPanel
      Parameters:
      g2d - The Graphics2D context used for drawing
    • drawVertices

      protected void drawVertices(Graphics2D g2d)
      Draws vertices of the ConflictGraph with labels.
      Specified by:
      drawVertices in class GraphPanel
      Parameters:
      g2d - The Graphics2D context used for drawing
    • saveToSvg

      public void saveToSvg(String filePath) throws IOException
      Saves the ConflictGraph visualization to an SVG file named "conflictgraph.svg".
      Overrides:
      saveToSvg in class GraphPanel
      Parameters:
      filePath - The file path where the SVG file will be saved
      Throws:
      IOException - If an error occurs during file writing