All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class HyperGraphPanel extends GraphPanel
Panel for visualizing a hypergraph with vertices and hyperedges. Extends GraphPanel and implements methods for specific hypergraph visualization.
See Also:
  • Constructor Details

    • HyperGraphPanel

      public HyperGraphPanel(HyperGraph hyperGraph)
      Constructs a HyperGraphPanel with the specified HyperGraph.
      Parameters:
      hyperGraph - The HyperGraph object representing the hypergraph to visualize
  • Method Details

    • calculateVertexPositions

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

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

      protected void drawVertices(Graphics2D g2d)
      Draws vertices of the HyperGraph 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 HyperGraph visualization to an SVG file named "hypergraph.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