Package pointgon

Class PGView

All Implemented Interfaces:
MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Serializable, Runnable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class PGView extends JFrame implements MouseListener, MouseMotionListener, Runnable
Class for a pointgon viewer window.
Since:
2005.02.20 (Christian Borgelt)
See Also:
  • Field Details

  • Constructor Details

    • PGView

      public PGView(boolean isProg)
      Create a pointgon viewer.
      Parameters:
      isProg - whether invoked as a standalone program
      Since:
      2005.02.20 (Christian Borgelt)
    • PGView

      public PGView()
      Create a pointgon viewer.
      Since:
      2005.02.20 (Christian Borgelt)
    • PGView

      public PGView(String title)
      Create a pointgon viewer.
      Parameters:
      title - the title of the main window
      Since:
      2005.02.20 (Christian Borgelt)
    • PGView

      public PGView(File file)
      Create a pointgon viewer.
      Parameters:
      file - the file from which to load a pointgon
      Since:
      2005.02.20 (Christian Borgelt)
    • PGView

      public PGView(String title, File file)
      Create a pointgon viewer.
      Parameters:
      title - the title of the main window
      file - the file from which to load a pointgon
      Since:
      2005.02.20 (Christian Borgelt)
  • Method Details

    • loadPointgon

      public void loadPointgon(File file)
      Load the current pointgon from a file.
      Parameters:
      file - the file to load the pointgon from
      Since:
      2005.02.20 (Christian Borgelt)
    • savePointgon

      public void savePointgon(File file)
      Save the current pointgon to a file.
      Parameters:
      file - the file to save the pointgon to
      Since:
      2005.02.20 (Christian Borgelt)
    • saveImage

      public void saveImage(File file)
      Save the Window contents as an image.
      Parameters:
      file - the file to save the image to
      Since:
      2005.02.20 (Christian Borgelt)
    • runMWT

      public void runMWT()
      Run minimum weight triangulation
      Since:
      2005.02.20 (Christian Borgelt)
    • mousePressed

      public void mousePressed(MouseEvent me)
      Process that a mouse button was pressed.
      Specified by:
      mousePressed in interface MouseListener
      Parameters:
      me - the mouse event to process
      Since:
      2005.02.20 (Christian Borgelt)
    • mouseDragged

      public void mouseDragged(MouseEvent e)
      Process that the mouse was dragged.
      Specified by:
      mouseDragged in interface MouseMotionListener
      Parameters:
      e - the mouse event to process
      Since:
      2005.02.20 (Christian Borgelt)
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Process that a mouse button was released.
      Specified by:
      mouseReleased in interface MouseListener
      Parameters:
      e - the mouse event to process
      Since:
      2005.02.20 (Christian Borgelt)
    • mouseClicked

      public void mouseClicked(MouseEvent e)
      Process that a mouse button was pressed.
      Specified by:
      mouseClicked in interface MouseListener
      Parameters:
      e - the mouse event to process
      Since:
      2005.02.20 (Christian Borgelt)
    • mouseEntered

      public void mouseEntered(MouseEvent e)
      Process that the mouse entered the window.
      Specified by:
      mouseEntered in interface MouseListener
      Parameters:
      e - the mouse event to process
      Since:
      2005.02.20 (Christian Borgelt)
    • mouseExited

      public void mouseExited(MouseEvent e)
      Process that the mouse exited the window.
      Specified by:
      mouseExited in interface MouseListener
      Parameters:
      e - the mouse event to process
      Since:
      2005.02.20 (Christian Borgelt)
    • mouseMoved

      public void mouseMoved(MouseEvent e)
      Process that the mouse was moved.
      Specified by:
      mouseMoved in interface MouseMotionListener
      Parameters:
      e - the mouse event to process
      Since:
      2005.02.20 (Christian Borgelt)
    • run

      public void run()
      Create the GUI of the pointgon viewer.
      Specified by:
      run in interface Runnable
      Since:
      2005.02.20 (Christian Borgelt)
    • main

      public static void main(String[] args)
      Main program for command line invocation.
      Parameters:
      args - the command line arguments
      Since:
      2005.02.20 (Christian Borgelt)