edu.princeton.repeatedgames.rgsolve.components
Class RGGui
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
edu.princeton.repeatedgames.rgsolve.components.RGGui
- All Implemented Interfaces:
- RGSolveProgressUpdater, java.awt.event.ActionListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
public final class RGGui
- extends javax.swing.JFrame
- implements java.awt.event.ActionListener, RGSolveProgressUpdater, java.awt.event.WindowListener, java.io.Serializable
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Fields inherited from class javax.swing.JFrame |
accessibleContext, EXIT_ON_CLOSE, 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 javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary |
RGGui(boolean isApplet,
boolean suppressSplash)
|
RGGui(RGSolveApplet rgsolveapplet,
boolean isApplet,
boolean suppressSplash)
|
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, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, 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, transferFocusBackward, 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, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, 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, isOpaque, 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, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, 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 |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
rgsolveapplet
public RGSolveApplet rgsolveapplet
thisMenu
public javax.swing.JMenuBar thisMenu
thisContainer
public java.awt.Container thisContainer
openAppletInFrame
javax.swing.JButton openAppletInFrame
appletIsPoppedOut
boolean appletIsPoppedOut
HELP
public javax.swing.JMenuItem HELP
ABOUT
public javax.swing.JMenuItem ABOUT
WEBSITE
public javax.swing.JMenuItem WEBSITE
SAVE_GAME
public javax.swing.JMenuItem SAVE_GAME
SAVE_AS_GAME
public javax.swing.JMenuItem SAVE_AS_GAME
LOAD_GAME
public javax.swing.JMenuItem LOAD_GAME
NEW_WINDOW
public javax.swing.JMenuItem NEW_WINDOW
TEXT_GAME_WINDOW
public javax.swing.JMenuItem TEXT_GAME_WINDOW
RULE_GAME_WINDOW
public javax.swing.JMenuItem RULE_GAME_WINDOW
COURNOT_DUOPOLY
public javax.swing.JMenuItem COURNOT_DUOPOLY
BERTRAND_DUOPOLY
public javax.swing.JMenuItem BERTRAND_DUOPOLY
RAND_NORM
public javax.swing.JMenuItem RAND_NORM
RAND_UNIFORM
public javax.swing.JMenuItem RAND_UNIFORM
PRIS_DILEMMA
public javax.swing.JMenuItem PRIS_DILEMMA
HAWK_DOVE
public javax.swing.JMenuItem HAWK_DOVE
SMOOTH_BERTRAND
public javax.swing.JMenuItem SMOOTH_BERTRAND
GRAB_THE_DOLLAR
public javax.swing.JMenuItem GRAB_THE_DOLLAR
BATTLE_OF_THE_SEXES
public javax.swing.JMenuItem BATTLE_OF_THE_SEXES
ARMS_RACE
public javax.swing.JMenuItem ARMS_RACE
AS_EXAMPLE_1
public javax.swing.JMenuItem AS_EXAMPLE_1
AS_EXAMPLE_2
public javax.swing.JMenuItem AS_EXAMPLE_2
POP_OUT_SOLUTION
public javax.swing.JMenuItem POP_OUT_SOLUTION
KEEP_SOLVING
public javax.swing.JMenuItem KEEP_SOLVING
MATHEMATICA
public javax.swing.JMenuItem MATHEMATICA
MATLAB
public javax.swing.JMenuItem MATLAB
LATEX_VSTAR_EQNS
public javax.swing.JMenuItem LATEX_VSTAR_EQNS
SET_MAX_FRAC_CONVERGENTS
public javax.swing.JMenuItem SET_MAX_FRAC_CONVERGENTS
SAVE_SOLN
public javax.swing.JMenuItem SAVE_SOLN
LOAD_SOLN
public javax.swing.JMenuItem LOAD_SOLN
EXIT
public javax.swing.JMenuItem EXIT
LATEX_TABLE
public javax.swing.JMenuItem LATEX_TABLE
SHOW_V_STAR
public javax.swing.JMenuItem SHOW_V_STAR
GET_PSNE
public javax.swing.JMenuItem GET_PSNE
GET_BR
public javax.swing.JMenuItem GET_BR
GET_IESDS
public javax.swing.JMenuItem GET_IESDS
SINGLE_LH
public javax.swing.JMenuItem SINGLE_LH
ALL_LH
public javax.swing.JMenuItem ALL_LH
FICT_PLAY
public javax.swing.JMenuItem FICT_PLAY
mainVertSplit
javax.swing.JSplitPane mainVertSplit
curFileName
java.lang.String curFileName
curFileExt
java.lang.String curFileExt
rgSoln
public RGSolution rgSoln
frameTitle
static final java.lang.String frameTitle
- See Also:
- Constant Field Values
help_file
public static final java.lang.String help_file
- See Also:
- Constant Field Values
rgsolve_web
public static final java.lang.String rgsolve_web
- See Also:
- Constant Field Values
optionFont
public static final java.awt.Font optionFont
isApplet
boolean isApplet
settingsPanel
SettingsPanel settingsPanel
topComp
TopComponent topComp
gameComp
GameComponents_new gameComp
tabs
javax.swing.JTabbedPane tabs
progressBar
javax.swing.JProgressBar progressBar
ProgressPanel
javax.swing.JPanel ProgressPanel
STOP
javax.swing.JButton STOP
progSplitPane
javax.swing.JSplitPane progSplitPane
progBarMax
public static final int progBarMax
- See Also:
- Constant Field Values
BIG_GAME_DIMENSION
public static final int BIG_GAME_DIMENSION
- See Also:
- Constant Field Values
BERTRAND_EXAMPLE
private static final java.lang.String BERTRAND_EXAMPLE
- See Also:
- Constant Field Values
wasStopped
public boolean wasStopped
topProgPanel
javax.swing.JPanel topProgPanel
solutionPanel
javax.swing.JPanel solutionPanel
progText
public javax.swing.JTextArea progText
progTextScroll
javax.swing.JScrollPane progTextScroll
gui_reference
RGGui gui_reference
RGGui
public RGGui(RGSolveApplet rgsolveapplet,
boolean isApplet,
boolean suppressSplash)
RGGui
public RGGui(boolean isApplet,
boolean suppressSplash)
main
public static void main(java.lang.String[] ars)
get_J_Menu_Bar
private javax.swing.JMenuBar get_J_Menu_Bar()
openWebpage
public static void openWebpage(java.net.URI uri)
openWebpage
public static void openWebpage(java.net.URL url)
getSpecialGame
public void getSpecialGame(int gameType)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
solve
private void solve(Point[] W0,
Point punishment)
triggerExit
private void triggerExit()
getProgressPanel
private void getProgressPanel()
wasStopped
public boolean wasStopped()
- Description copied from interface:
RGSolveProgressUpdater
- returns whether the solver thread has been stopped
by the GUI and the algorithm should cease
- Specified by:
wasStopped
in interface RGSolveProgressUpdater
- Returns:
- if the algorithm has been stopped
setProgress
public void setProgress(int iter,
int maxIter)
- Description copied from interface:
RGSolveProgressUpdater
- Sets the state of the solver into the GUI
- Specified by:
setProgress
in interface RGSolveProgressUpdater
- Parameters:
iter
- the current iterationsmaxIter
- the max no. of iterations
printProgress
public void printProgress(java.lang.String progressString)
- Description copied from interface:
RGSolveProgressUpdater
- Prints
progressString
to wherever
the GUI is displaying progress updates
- Specified by:
printProgress
in interface RGSolveProgressUpdater
clearProgress
public void clearProgress()
- Description copied from interface:
RGSolveProgressUpdater
- clears the progress update location
- Specified by:
clearProgress
in interface RGSolveProgressUpdater
windowClosing
public void windowClosing(java.awt.event.WindowEvent e)
- Specified by:
windowClosing
in interface java.awt.event.WindowListener
windowOpened
public void windowOpened(java.awt.event.WindowEvent e)
- Specified by:
windowOpened
in interface java.awt.event.WindowListener
windowClosed
public void windowClosed(java.awt.event.WindowEvent e)
- Specified by:
windowClosed
in interface java.awt.event.WindowListener
windowIconified
public void windowIconified(java.awt.event.WindowEvent e)
- Specified by:
windowIconified
in interface java.awt.event.WindowListener
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent e)
- Specified by:
windowDeiconified
in interface java.awt.event.WindowListener
windowActivated
public void windowActivated(java.awt.event.WindowEvent e)
- Specified by:
windowActivated
in interface java.awt.event.WindowListener
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent e)
- Specified by:
windowDeactivated
in interface java.awt.event.WindowListener
writeHelpFile
private java.io.File writeHelpFile()
writeBertrandExample
private java.io.File writeBertrandExample()
showVStarInformation
static void showVStarInformation(RGSolution rgSoln,
java.lang.String curFileName)