org.opensourcephysics.cabrillo.tracker
Class PrefsDialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by org.opensourcephysics.cabrillo.tracker.PrefsDialog
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class PrefsDialog
extends javax.swing.JDialog

This displays and sets preferences for a TrackerPanel.

Author:
Douglas Brown
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
 
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
 
Field Summary
protected  javax.swing.JButton allButton
           
protected  javax.swing.JButton applyButton
           
protected  javax.swing.JTextField cacheField
           
protected  javax.swing.JLabel cacheLabel
           
protected  javax.swing.JButton cancelButton
           
protected  javax.swing.JButton checkForUpgradeButton
           
protected  javax.swing.JComboBox checkForUpgradeDropdown
           
protected  javax.swing.JPanel checkPanel
           
protected  javax.swing.JButton clearCacheButton
           
protected  javax.swing.JButton clearHostButton
           
protected  javax.swing.JButton clearRecentButton
           
protected static java.io.File codeBaseDir
           
protected  javax.swing.JPanel configPanel
           
protected  javax.swing.JCheckBox defaultMemoryCheckbox
           
protected  javax.swing.JRadioButton degreesButton
           
protected  javax.swing.JPanel displayPanel
           
protected  TFrame frame
           
protected  javax.swing.JPanel generalPanel
           
protected  javax.swing.JCheckBox hintsCheckbox
           
protected static java.lang.String javaHome
           
protected  javax.swing.JComboBox jreDropdown
           
protected  javax.swing.JComboBox languageDropdown
           
protected  javax.swing.JComboBox logLevelDropdown
           
protected  javax.swing.JComboBox lookFeelDropdown
           
protected  javax.swing.JLabel lookFeelLabel
           
protected  javax.swing.JPanel mainButtonBar
           
protected  IntegerField memoryField
           
protected  javax.swing.JLabel memoryLabel
           
protected  int memorySize
           
protected  javax.swing.JRadioButton noEngineButton
           
protected  javax.swing.JButton noneButton
           
protected  javax.swing.JButton okButton
           
protected  java.io.File prevCache
           
protected  boolean prevClearCacheOnExit
           
protected  java.util.Set<java.lang.String> prevEnabled
           
protected  java.lang.String prevEngine
           
protected  java.lang.String[] prevExecutables
           
protected  boolean prevFastXuggle
           
protected  boolean prevHints
           
protected  java.lang.String prevJRE
           
protected  java.lang.String prevLocaleName
           
protected  java.lang.String prevLookFeel
           
protected  int prevMemory
           
protected  boolean prevRadians
           
protected  int prevRecentCount
           
protected  java.lang.String prevTrackerJar
           
protected  int prevUpgradeInterval
           
protected  boolean prevUse32BitVM
           
protected  boolean prevWarnNoVideoEngine
           
protected  boolean prevWarnXuggleError
           
protected  javax.swing.JRadioButton qtButton
           
protected  javax.swing.JRadioButton radiansButton
           
protected  java.lang.String recent32bitVM
           
protected  java.lang.String recent64bitVM
           
protected  javax.swing.JLabel recentSizeLabel
           
protected  javax.swing.JSpinner recentSizeSpinner
           
protected  javax.swing.JButton relaunchButton
           
protected  javax.swing.JTextField runField
           
protected  javax.swing.JLabel runLabel
           
protected  javax.swing.JSpinner runSpinner
           
protected  javax.swing.JPanel runtimePanel
           
protected  javax.swing.JButton saveButton
           
protected  javax.swing.JButton setCacheButton
           
protected  javax.swing.JButton setRunButton
           
protected  javax.swing.JTabbedPane tabbedPane
           
protected static java.io.FilenameFilter trackerJarFilter
           
protected  TrackerPanel trackerPanel
           
protected  java.lang.String[] trackerVersions
           
protected static java.lang.String userHome
           
protected  javax.swing.JCheckBox variableDurationCheckBox
           
protected  javax.swing.JComboBox versionDropdown
           
protected  javax.swing.JLabel versionLabel
           
protected  javax.swing.JPanel videoPanel
           
protected  javax.swing.JCheckBox vidWarningCheckbox
           
protected  javax.swing.JRadioButton vm32Button
           
protected  javax.swing.JRadioButton vm64Button
           
protected static boolean webStartWarningShown
           
protected  javax.swing.JRadioButton xuggleButton
           
protected  javax.swing.JCheckBox xuggleErrorCheckbox
           
protected  javax.swing.JRadioButton xuggleFastButton
           
protected  javax.swing.JRadioButton xuggleSlowButton
           
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
 
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, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PrefsDialog(TrackerPanel panel, TFrame frame)
          Constructs a PrefsDialog.
 
Method Summary
protected static javax.swing.JFileChooser getFileChooser(java.io.File file, boolean useJREFilter)
          Gets a file chooser.
protected  void refreshGUI()
          Refreshes the GUI.
 void setVisible(boolean vis)
           
protected  void updateDisplay()
          Updates this dialog to show the TrackerPanel's current preferences.
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, show, toBack
 
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, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, 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, remove, 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
 

Field Detail

webStartWarningShown

protected static boolean webStartWarningShown

userHome

protected static java.lang.String userHome

javaHome

protected static java.lang.String javaHome

trackerJarFilter

protected static java.io.FilenameFilter trackerJarFilter

codeBaseDir

protected static java.io.File codeBaseDir

trackerPanel

protected TrackerPanel trackerPanel

frame

protected TFrame frame

okButton

protected javax.swing.JButton okButton

cancelButton

protected javax.swing.JButton cancelButton

allButton

protected javax.swing.JButton allButton

noneButton

protected javax.swing.JButton noneButton

applyButton

protected javax.swing.JButton applyButton

saveButton

protected javax.swing.JButton saveButton

relaunchButton

protected javax.swing.JButton relaunchButton

clearRecentButton

protected javax.swing.JButton clearRecentButton

checkForUpgradeButton

protected javax.swing.JButton checkForUpgradeButton

clearHostButton

protected javax.swing.JButton clearHostButton

setCacheButton

protected javax.swing.JButton setCacheButton

clearCacheButton

protected javax.swing.JButton clearCacheButton

setRunButton

protected javax.swing.JButton setRunButton

cacheField

protected javax.swing.JTextField cacheField

runField

protected javax.swing.JTextField runField

checkPanel

protected javax.swing.JPanel checkPanel

mainButtonBar

protected javax.swing.JPanel mainButtonBar

tabbedPane

protected javax.swing.JTabbedPane tabbedPane

configPanel

protected javax.swing.JPanel configPanel

runtimePanel

protected javax.swing.JPanel runtimePanel

videoPanel

protected javax.swing.JPanel videoPanel

generalPanel

protected javax.swing.JPanel generalPanel

displayPanel

protected javax.swing.JPanel displayPanel

memoryField

protected IntegerField memoryField

memoryLabel

protected javax.swing.JLabel memoryLabel

recentSizeLabel

protected javax.swing.JLabel recentSizeLabel

lookFeelLabel

protected javax.swing.JLabel lookFeelLabel

cacheLabel

protected javax.swing.JLabel cacheLabel

versionLabel

protected javax.swing.JLabel versionLabel

runLabel

protected javax.swing.JLabel runLabel

defaultMemoryCheckbox

protected javax.swing.JCheckBox defaultMemoryCheckbox

hintsCheckbox

protected javax.swing.JCheckBox hintsCheckbox

vidWarningCheckbox

protected javax.swing.JCheckBox vidWarningCheckbox

xuggleErrorCheckbox

protected javax.swing.JCheckBox xuggleErrorCheckbox

variableDurationCheckBox

protected javax.swing.JCheckBox variableDurationCheckBox

memorySize

protected int memorySize

recentSizeSpinner

protected javax.swing.JSpinner recentSizeSpinner

runSpinner

protected javax.swing.JSpinner runSpinner

lookFeelDropdown

protected javax.swing.JComboBox lookFeelDropdown

languageDropdown

protected javax.swing.JComboBox languageDropdown

jreDropdown

protected javax.swing.JComboBox jreDropdown

checkForUpgradeDropdown

protected javax.swing.JComboBox checkForUpgradeDropdown

versionDropdown

protected javax.swing.JComboBox versionDropdown

logLevelDropdown

protected javax.swing.JComboBox logLevelDropdown

vm32Button

protected javax.swing.JRadioButton vm32Button

vm64Button

protected javax.swing.JRadioButton vm64Button

xuggleButton

protected javax.swing.JRadioButton xuggleButton

qtButton

protected javax.swing.JRadioButton qtButton

noEngineButton

protected javax.swing.JRadioButton noEngineButton

radiansButton

protected javax.swing.JRadioButton radiansButton

degreesButton

protected javax.swing.JRadioButton degreesButton

xuggleFastButton

protected javax.swing.JRadioButton xuggleFastButton

xuggleSlowButton

protected javax.swing.JRadioButton xuggleSlowButton

trackerVersions

protected java.lang.String[] trackerVersions

recent32bitVM

protected java.lang.String recent32bitVM

recent64bitVM

protected java.lang.String recent64bitVM

prevEnabled

protected java.util.Set<java.lang.String> prevEnabled

prevMemory

protected int prevMemory

prevRecentCount

protected int prevRecentCount

prevUpgradeInterval

protected int prevUpgradeInterval

prevLookFeel

protected java.lang.String prevLookFeel

prevLocaleName

protected java.lang.String prevLocaleName

prevJRE

protected java.lang.String prevJRE

prevTrackerJar

protected java.lang.String prevTrackerJar

prevEngine

protected java.lang.String prevEngine

prevHints

protected boolean prevHints

prevRadians

protected boolean prevRadians

prevFastXuggle

protected boolean prevFastXuggle

prevWarnNoVideoEngine

protected boolean prevWarnNoVideoEngine

prevWarnXuggleError

protected boolean prevWarnXuggleError

prevClearCacheOnExit

protected boolean prevClearCacheOnExit

prevUse32BitVM

protected boolean prevUse32BitVM

prevCache

protected java.io.File prevCache

prevExecutables

protected java.lang.String[] prevExecutables
Constructor Detail

PrefsDialog

public PrefsDialog(TrackerPanel panel,
                   TFrame frame)
Constructs a PrefsDialog.

Parameters:
panel - the tracker panel
frame - the parent TFrame
Method Detail

setVisible

public void setVisible(boolean vis)
Overrides:
setVisible in class java.awt.Dialog

refreshGUI

protected void refreshGUI()
Refreshes the GUI.


updateDisplay

protected void updateDisplay()
Updates this dialog to show the TrackerPanel's current preferences.


getFileChooser

protected static javax.swing.JFileChooser getFileChooser(java.io.File file,
                                                         boolean useJREFilter)
Gets a file chooser.

Parameters:
file - the initial file to select
useJREFilter - true if setting JRE
Returns:
the file chooser