Package pointgon
Class PGView
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,ImageObserver
,MenuContainer
,Serializable
,Runnable
,EventListener
,Accessible
,RootPaneContainer
,WindowConstants
Class for a pointgon viewer window.
- Since:
- 2005.02.20 (Christian Borgelt)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.Type
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsFields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
loadPointgon
(File file) Load the current pointgon from a file.static void
Main program for command line invocation.void
Process that a mouse button was pressed.void
Process that the mouse was dragged.void
Process that the mouse entered the window.void
Process that the mouse exited the window.void
Process that the mouse was moved.void
Process that a mouse button was pressed.void
Process that a mouse button was released.void
run()
Create the GUI of the pointgon viewer.void
runMWT()
Run minimum weight triangulationvoid
Save the Window contents as an image.void
savePointgon
(File file) Save the current pointgon to a file.Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
VERSION
the version string- See Also:
-
-
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
Create a pointgon viewer.- Parameters:
title
- the title of the main window- Since:
- 2005.02.20 (Christian Borgelt)
-
PGView
Create a pointgon viewer.- Parameters:
file
- the file from which to load a pointgon- Since:
- 2005.02.20 (Christian Borgelt)
-
PGView
Create a pointgon viewer.- Parameters:
title
- the title of the main windowfile
- the file from which to load a pointgon- Since:
- 2005.02.20 (Christian Borgelt)
-
-
Method Details
-
loadPointgon
Load the current pointgon from a file.- Parameters:
file
- the file to load the pointgon from- Since:
- 2005.02.20 (Christian Borgelt)
-
savePointgon
Save the current pointgon to a file.- Parameters:
file
- the file to save the pointgon to- Since:
- 2005.02.20 (Christian Borgelt)
-
saveImage
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
Process that a mouse button was pressed.- Specified by:
mousePressed
in interfaceMouseListener
- Parameters:
me
- the mouse event to process- Since:
- 2005.02.20 (Christian Borgelt)
-
mouseDragged
Process that the mouse was dragged.- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Parameters:
e
- the mouse event to process- Since:
- 2005.02.20 (Christian Borgelt)
-
mouseReleased
Process that a mouse button was released.- Specified by:
mouseReleased
in interfaceMouseListener
- Parameters:
e
- the mouse event to process- Since:
- 2005.02.20 (Christian Borgelt)
-
mouseClicked
Process that a mouse button was pressed.- Specified by:
mouseClicked
in interfaceMouseListener
- Parameters:
e
- the mouse event to process- Since:
- 2005.02.20 (Christian Borgelt)
-
mouseEntered
Process that the mouse entered the window.- Specified by:
mouseEntered
in interfaceMouseListener
- Parameters:
e
- the mouse event to process- Since:
- 2005.02.20 (Christian Borgelt)
-
mouseExited
Process that the mouse exited the window.- Specified by:
mouseExited
in interfaceMouseListener
- Parameters:
e
- the mouse event to process- Since:
- 2005.02.20 (Christian Borgelt)
-
mouseMoved
Process that the mouse was moved.- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Parameters:
e
- the mouse event to process- Since:
- 2005.02.20 (Christian Borgelt)
-
run
public void run()Create the GUI of the pointgon viewer. -
main
Main program for command line invocation.- Parameters:
args
- the command line arguments- Since:
- 2005.02.20 (Christian Borgelt)
-