All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class GraphViewPanel extends JPanel
Draws a graph of the DonatelloNodes.
See Also:
  • Constructor Details

    • GraphViewPanel

      public GraphViewPanel()
  • Method Details

    • paintComponent

      public void paintComponent(Graphics g)
      Custom rendering of the JPanel.
    • drawBufferedImageAtPosition

      public void drawBufferedImageAtPosition(Graphics2D g, BufferedImage bi, int x, int y)
    • screenToWorld

      public Point screenToWorld(Point p)
      Parameters:
      p - a Point in screen coordinates.
      Returns:
      a new Point in world coordinates.
    • worldToScreen

      public Point worldToScreen(Point point)
    • setDrawGrid

      public void setDrawGrid(boolean selected)
    • getDrawGrid

      public boolean getDrawGrid()
    • toJSON

      public org.json.JSONObject toJSON()
    • fromJSON

      public void fromJSON(org.json.JSONObject json)