gate.gui
Class OptionsDialog

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 gate.gui.OptionsDialog
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class OptionsDialog
extends JDialog

The options dialog for Gate.

See Also:
Serialized Form

Nested Class Summary
protected  class OptionsDialog.CancelAction
           
protected static class OptionsDialog.LNFData
           
 
Nested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
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
protected  JCheckBox addSpaceOnMarkupUnpackChk
          The "Add extra space markup unpack if needed" checkbox
protected  JComboBox browserComboBox
          List of browsers.
protected  JTextField browserCommandLineTextField
          Browser command line.
protected  JButton cancelButton
          The Cancel button for the dialog.
protected  Font componentsFont
          The font to be used for GUI components; cached value for the one in the user config map.
static String[] componentsKeys
           
protected  boolean dirtyGUI
          This flag becomes true when an GUI related option has been changed
protected  ButtonGroup fontBG
          Button group for the font setting radio buttons
protected  JFontChooser fontChooser
          The font chooser used for selecting fonts
protected  JCheckBox includeFeaturesOnPreserveFormatChk
          The "Include Annotation Features in Save Preserving Format" checkbox
protected  JComboBox lnfCombo
          The combobox for the look and feel selection
protected  String lookAndFeelClassName
          The name of the look and feel class
protected  JTabbedPane mainTabbedPane
          The main tabbed pane
protected  JRadioButton menuBtn
          Radio button used to set the font for menu components
static String[] menuKeys
           
protected  Font menusFont
          The font to be used for the menus; cached value for the one in the user config map.
protected  JButton okButton
          The OK button for the dialog.
protected  JRadioButton otherCompsBtn
          Radio button used to set the font for other components
protected  JCheckBox saveOptionsChk
          The "Save Options on close" checkbox
protected  JCheckBox saveSessionChk
          The "Save Session on close" checkbox
protected  String selectedFontBtn
          which text is currently being edited; values are: "text", "menu", "other"
protected  JRadioButton textBtn
          Radio button used to set the font for text components
protected  Font textComponentsFont
          The font to be used for text components; cached value for the one in the user config map.
static String[] textComponentsKeys
           
protected  JCheckBox treeSelectViewChk
           
protected  JCheckBox viewSelectTreeChk
           
 
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
OptionsDialog(Frame owner)
           
 
Method Summary
protected  void initGuiComponents()
           
protected  void initListeners()
           
protected  void initLocalData()
           
static void main(String[] args)
           
protected  void selectedFontChanged()
           
static void setComponentsFont(Font font)
          Updates the Swing defaults table with the provided font to be used for various compoents that neither text or menu components
static void setMenuComponentsFont(Font font)
          Updates the Swing defaults table with the provided font to be used for the menu components
static void setTextComponentsFont(Font font)
          Updates the Swing defaults table with the provided font to be used for the text components
protected static void setUIDefaults(Object[] keys, Object value)
           
 void showDialog()
           
 
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, setVisible, 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

menuKeys

public static String[] menuKeys

componentsKeys

public static String[] componentsKeys

textComponentsKeys

public static String[] textComponentsKeys

mainTabbedPane

protected JTabbedPane mainTabbedPane
The main tabbed pane


textBtn

protected JRadioButton textBtn
Radio button used to set the font for text components


okButton

protected JButton okButton
The OK button for the dialog. It's set as protected so it can be accessed by subclasses in other projects.


cancelButton

protected JButton cancelButton
The Cancel button for the dialog. It's set as protected so it can be accessed by subclasses in other projects.


selectedFontBtn

protected String selectedFontBtn
which text is currently being edited; values are: "text", "menu", "other"


menuBtn

protected JRadioButton menuBtn
Radio button used to set the font for menu components


otherCompsBtn

protected JRadioButton otherCompsBtn
Radio button used to set the font for other components


fontBG

protected ButtonGroup fontBG
Button group for the font setting radio buttons


fontChooser

protected JFontChooser fontChooser
The font chooser used for selecting fonts


saveOptionsChk

protected JCheckBox saveOptionsChk
The "Save Options on close" checkbox


saveSessionChk

protected JCheckBox saveSessionChk
The "Save Session on close" checkbox


includeFeaturesOnPreserveFormatChk

protected JCheckBox includeFeaturesOnPreserveFormatChk
The "Include Annotation Features in Save Preserving Format" checkbox


addSpaceOnMarkupUnpackChk

protected JCheckBox addSpaceOnMarkupUnpackChk
The "Add extra space markup unpack if needed" checkbox


lookAndFeelClassName

protected String lookAndFeelClassName
The name of the look and feel class


menusFont

protected Font menusFont
The font to be used for the menus; cached value for the one in the user config map.


textComponentsFont

protected Font textComponentsFont
The font to be used for text components; cached value for the one in the user config map.


componentsFont

protected Font componentsFont
The font to be used for GUI components; cached value for the one in the user config map.


dirtyGUI

protected boolean dirtyGUI
This flag becomes true when an GUI related option has been changed


lnfCombo

protected JComboBox lnfCombo
The combobox for the look and feel selection


browserComboBox

protected JComboBox browserComboBox
List of browsers. Update the browserCommandLineTextField.


browserCommandLineTextField

protected JTextField browserCommandLineTextField
Browser command line.


treeSelectViewChk

protected JCheckBox treeSelectViewChk

viewSelectTreeChk

protected JCheckBox viewSelectTreeChk
Constructor Detail

OptionsDialog

public OptionsDialog(Frame owner)
Method Detail

initLocalData

protected void initLocalData()

initGuiComponents

protected void initGuiComponents()

initListeners

protected void initListeners()

selectedFontChanged

protected void selectedFontChanged()

showDialog

public void showDialog()

main

public static void main(String[] args)

setUIDefaults

protected static void setUIDefaults(Object[] keys,
                                    Object value)

setTextComponentsFont

public static void setTextComponentsFont(Font font)
Updates the Swing defaults table with the provided font to be used for the text components


setMenuComponentsFont

public static void setMenuComponentsFont(Font font)
Updates the Swing defaults table with the provided font to be used for the menu components


setComponentsFont

public static void setComponentsFont(Font font)
Updates the Swing defaults table with the provided font to be used for various compoents that neither text or menu components