## gate.gui
Class MainFrame

    java.lang.Object
      |
      +--java.awt.Component
            |
            +--java.awt.Container
                  |
                  +--java.awt.Window
                        |
                        +--java.awt.Frame
                              |
                              +--javax.swing.JFrame
                                    |
                                    +--gate.gui.MainFrame

All Implemented Interfaces:
  Accessible, CreoleListener, EventListener, ImageObserver, MenuContainer, ProgressListener, RootPaneContainer, Serializable, StatusListener, WindowConstants

public class MainFrame
extends JFrame
implements ProgressListener, StatusListener, CreoleListener

The main Gate GUI frame.

See Also:
  Serialized Form

Inner Class Summary
`(package private) class` `MainFrame.CartoonMinder` During longer operations it is nice to keep the user entertained so (s)he doesn't fall asleep looking at a progress bar that seems have stopped.
`(package private) class` `MainFrame.CloseSelectedResourcesAction`
`(package private) class` `MainFrame.CloseViewAction` Closes the view associated to a resource.
`(package private) class` `MainFrame.ExitGateAction` Closes the view associated to a resource.
`(package private) class` `MainFrame.HelpAboutAction`
`(package private) class` `MainFrame.HelpUserGuideAction`
`(package private) class` `MainFrame.LoadANNIEWithDefaultsAction` This class represent an action which loads ANNIE with default params
`(package private) class` `MainFrame.LoadANNIEWithoutDefaultsAction` This class represent an action which loads ANNIE without default param
`(package private) class` `MainFrame.LoadCreoleRepositoryAction`
`(package private) class` `MainFrame.LoadResourceFromFileAction`
`(package private) class` `MainFrame.LocaleSelectorMenuItem`
`(package private) class` `MainFrame.NewAnnotDiffAction` This class represent an action which brings up the Annot Diff tool
`(package private) class` `MainFrame.NewBootStrapAction`
`(package private) class` `MainFrame.NewCorpusEvalAction` This class represent an action which brings up the corpus evaluation tool
`(package private) class` `MainFrame.NewDSAction`
`(package private) class` `MainFrame.NewResourceAction`
`(package private) class` `MainFrame.OpenDSAction`
`(package private) class` `MainFrame.ProgressBarUpdater` Model for the tree representing the resources loaded in the system
`protected class` `MainFrame.ResourceTreeCellRenderer`
`(package private) class` `MainFrame.StatusBarUpdater`
`(package private) class` `MainFrame.StopAction`

Inner classes inherited from class javax.swing.JFrame
`JFrame.AccessibleJFrame`

Inner classes inherited from class java.awt.Frame
`Frame.AccessibleAWTFrame`

Inner classes inherited from class java.awt.Window
`Window.AccessibleAWTWindow`

Inner classes inherited from class java.awt.Container
`Container.AccessibleAWTContainer`

Inner classes inherited from class java.awt.Component
`Component.AccessibleAWTComponent, Component.AWTTreeLock`

Field Summary
`(package private) MainFrame.CartoonMinder` `animator`
`(package private) AppearanceDialog` `appearanceDialog`
`(package private) DefaultMutableTreeNode` `applicationsRoot`
`(package private) JPopupMenu` `appsPopup`
`(package private) DefaultMutableTreeNode` `datastoresRoot`
`(package private) JPopupMenu` `dssPopup`
`(package private) static JFileChooser` `fileChooser`
`private static Collection` `guiRoots`
`(package private) MainFrame.HelpAboutAction` `helpAboutAction`
`(package private) static Map` `iconByName` Holds all the icons used in the Gate GUI indexed by filename.
`(package private) DefaultMutableTreeNode` `languageResourcesRoot`
`(package private) JSplitPane` `leftSplit`
`private static Map` `listeners` A Map which holds listeners that are singletons (e.g.
`(package private) JMenu` `loadANNIEMenu`
`(package private) LogArea` `logArea`
`(package private) TabHighlighter` `logHighlighter`
`(package private) JScrollPane` `logScroll`
`(package private) JScrollPane` `lowerScroll`
`(package private) JPopupMenu` `lrsPopup`
`(package private) JSplitPane` `mainSplit`
`(package private) XJTabbedPane` `mainTabbedPane`
`(package private) JMenuBar` `menuBar`
`(package private) MainFrame.NewAnnotDiffAction` `newAnnotDiffAction`
`(package private) JMenu` `newAppMenu`
`(package private) JMenu` `newAppPopupMenu`
`(package private) MainFrame.NewBootStrapAction` `newBootStrapAction`
`(package private) MainFrame.NewCorpusEvalAction` `newCorpusEvalAction`
`(package private) MainFrame.NewDSAction` `newDSAction`
`(package private) JMenu` `newLrMenu` used in menu bar
`(package private) JMenu` `newLrsPopupMenu` used in popups
`(package private) JMenu` `newPrMenu`
`(package private) JMenu` `newPrsPopupMenu`
`(package private) NewResourceDialog` `newResourceDialog`
`(package private) MainFrame.OpenDSAction` `openDSAction`
`(package private) OptionsDialog` `optionsDialog`
`(package private) DefaultMutableTreeNode` `processingResourcesRoot`
`(package private) JProgressBar` `progressBar`
`(package private) JScrollPane` `projectTreeScroll`
`(package private) JPopupMenu` `prsPopup`
`(package private) JTree` `resourcesTree`
`(package private) DefaultTreeModel` `resourcesTreeModel`
`(package private) DefaultMutableTreeNode` `resourcesTreeRoot`
`(package private) JScrollPane` `resourcesTreeScroll`
`(package private) Box` `southBox`
`(package private) Splash` `splash`
`(package private) JLabel` `statusBar`
`(package private) Action` `stopAction`
`(package private) JButton` `stopBtn`
`(package private) JToolBar` `toolbar`
`(package private) WaitDialog` `waitDialog`

Fields inherited from class javax.swing.JFrame
`accessibleContext, defaultCloseOperation, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled`

Fields inherited from class java.awt.Frame
`base, CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, frameSerializedDataVersion, HAND_CURSOR, icon, ICONIFIED, mbManagement, MOVE_CURSOR, N_RESIZE_CURSOR, nameCounter, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, serialVersionUID, state, SW_RESIZE_CURSOR, TEXT_CURSOR, title, W_RESIZE_CURSOR, WAIT_CURSOR, weakThis`

Fields inherited from class java.awt.Window
`active, dbg, focusMgr, inputContext, inputContextLock, OPENED, ownedWindowList, warningString, windowListener, windowSerializedDataVersion`

Fields inherited from class java.awt.Container
`component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads`

Fields inherited from class java.awt.Component

`actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y`

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
`MainFrame()` Construct the frame

Method Summary
`void` `datastoreClosed(CreoleEvent e)` Called when a `DataStore` has been closed
`void` `datastoreCreated(CreoleEvent e)` Called when a `DataStore` has been created
`void` `datastoreOpened(CreoleEvent e)` Called when a `DataStore` has been opened
`static JFileChooser` `getFileChooser()`
`static Collection` `getGuiRoots()`
`static Icon` `getIcon(String filename)`
`static Map` `getListeners()` Returns the listeners map, a map that holds all the listeners that are singletons (e.g.
`protected void` `initGuiComponents()`
`protected void` `initListeners()`
`protected void` `initLocalData()`
`void` `processFinished()` Called when the process is finished.
`protected void` `processWindowEvent(WindowEvent e)` Overridden so we can exit when window is closed
`void` `progressChanged(int i)` Called when the progress has changed
`void` `resourceLoaded(CreoleEvent e)` Called when a new `Resource` has been loaded into the system
`void` `resourceUnloaded(CreoleEvent e)` Called when a `Resource` has been removed from the system
`protected void` `select(Handle handle)`
`void` `statusChanged(String text)` Calleed when there a new status message.

Methods inherited from class javax.swing.JFrame
`addImpl, createRootPane, createRootPaneException, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update`

Methods inherited from class java.awt.Frame
`<clinit>, addNotify, addToFrameList, constructComponentName, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, initIDs, isResizable, postProcessKeyEvent, readObject, remove, removeFromFrameList, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle, writeObject`

Methods inherited from class java.awt.Window

`addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, setWarningString, show, toBack, toFront, transferFocus`

Methods inherited from class java.awt.Container

`add, add, add, add, add, addContainerListener, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paint, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, removeAll, removeContainerListener, setFont, validate, validateTree`

Methods inherited from class java.awt.Component

`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, 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, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait`

Methods inherited from interface java.awt.MenuContainer
`getFont, postEvent`

Field Detail

### menuBar

    JMenuBar menuBar

### mainSplit

    JSplitPane mainSplit

### leftSplit

    JSplitPane leftSplit

### southBox

    Box southBox

### statusBar

    JLabel statusBar

### progressBar

    JProgressBar progressBar

### mainTabbedPane

    XJTabbedPane mainTabbedPane

### projectTreeScroll

    JScrollPane projectTreeScroll

### lowerScroll

    JScrollPane lowerScroll

### appsPopup

    JPopupMenu appsPopup

### dssPopup

    JPopupMenu dssPopup

### lrsPopup

    JPopupMenu lrsPopup

### prsPopup

    JPopupMenu prsPopup

### newLrsPopupMenu

    JMenu newLrsPopupMenu

  used in popups

### newPrsPopupMenu

    JMenu newPrsPopupMenu

### newAppPopupMenu

    JMenu newAppPopupMenu

### newLrMenu

    JMenu newLrMenu

  used in menu bar

### newPrMenu

    JMenu newPrMenu

### newAppMenu

    JMenu newAppMenu

### loadANNIEMenu

    JMenu loadANNIEMenu

### stopBtn

    JButton stopBtn

### stopAction

    Action stopAction

### resourcesTree

    JTree resourcesTree

### resourcesTreeScroll

    JScrollPane resourcesTreeScroll

### resourcesTreeModel

    DefaultTreeModel resourcesTreeModel

### resourcesTreeRoot

    DefaultMutableTreeNode resourcesTreeRoot

### applicationsRoot

    DefaultMutableTreeNode applicationsRoot

### languageResourcesRoot

    DefaultMutableTreeNode languageResourcesRoot

### processingResourcesRoot

    DefaultMutableTreeNode processingResourcesRoot

### datastoresRoot

    DefaultMutableTreeNode datastoresRoot

### splash

    Splash splash

### logArea

    LogArea logArea

### logScroll

    JScrollPane logScroll

### toolbar

    JToolBar toolbar

### fileChooser

    static JFileChooser fileChooser

### appearanceDialog

    AppearanceDialog appearanceDialog

### optionsDialog

    OptionsDialog optionsDialog

### animator

    MainFrame.CartoonMinder animator

### logHighlighter

    TabHighlighter logHighlighter

### newResourceDialog

    NewResourceDialog newResourceDialog

### waitDialog

    WaitDialog waitDialog

### newDSAction

    MainFrame.NewDSAction newDSAction

### openDSAction

    MainFrame.OpenDSAction openDSAction

### helpAboutAction

    MainFrame.HelpAboutAction helpAboutAction

### newAnnotDiffAction

    MainFrame.NewAnnotDiffAction newAnnotDiffAction

### newBootStrapAction

    MainFrame.NewBootStrapAction newBootStrapAction

### newCorpusEvalAction

    MainFrame.NewCorpusEvalAction newCorpusEvalAction

### iconByName

    static Map iconByName

  Holds all the icons used in the Gate GUI indexed by filename. This is needed so we do not need to decode the icon everytime we need it as that would use unecessary CPU time and memory. Access to this data is avaialable through the `getIcon(String)` method.

### listeners

    private static Map listeners

  A Map which holds listeners that are singletons (e.g. the status listener that updates the status bar on the main frame or the progress listener that updates the progress bar on the main frame). The keys used are the class names of the listener interface and the values are the actual listeners (e.g "gate.event.StatusListener" -> this).

### guiRoots

    private static Collection guiRoots

Constructor Detail

### MainFrame

    public MainFrame()

  Construct the frame

Method Detail

### getIcon

    public static Icon getIcon(String filename)

### getFileChooser

    public static JFileChooser getFileChooser()

### select

    protected void select(Handle handle)

### initLocalData

    protected void initLocalData()

### initGuiComponents

    protected void initGuiComponents()

### initListeners

    protected void initListeners()

### progressChanged

    public void progressChanged(int i)

  Description copied from interface: `ProgressListener`
  Called when the progress has changed
  Specified by:
    `progressChanged` in interface `ProgressListener`
  Following copied from interface: `gate.event.ProgressListener`
  Parameters:
    `i` -

### processFinished

    public void processFinished()

  Called when the process is finished.
  Specified by:
    `processFinished` in interface `ProgressListener`

### statusChanged

    public void statusChanged(String text)

  Description copied from interface: `StatusListener`
  Calleed when there a new status message.
  Specified by:
    `statusChanged` in interface `StatusListener`
  Following copied from interface: `gate.event.StatusListener`
  Parameters:
    `text` -

### resourceLoaded

    public void resourceLoaded(CreoleEvent e)

  Description copied from interface: `CreoleListener`
  Called when a new `Resource` has been loaded into the system
  Specified by:
    `resourceLoaded` in interface `CreoleListener`

### resourceUnloaded

    public void resourceUnloaded(CreoleEvent e)

  Description copied from interface: `CreoleListener`
  Called when a `Resource` has been removed from the system
  Specified by:
    `resourceUnloaded` in interface `CreoleListener`

### datastoreOpened

    public void datastoreOpened(CreoleEvent e)

  Called when a `DataStore` has been opened
  Specified by:
    `datastoreOpened` in interface `CreoleListener`

### datastoreCreated

    public void datastoreCreated(CreoleEvent e)

  Called when a `DataStore` has been created
  Specified by:
    `datastoreCreated` in interface `CreoleListener`

### datastoreClosed

    public void datastoreClosed(CreoleEvent e)

  Called when a `DataStore` has been closed
  Specified by:
    `datastoreClosed` in interface `CreoleListener`

### processWindowEvent

    protected void processWindowEvent(WindowEvent e)

  Overridden so we can exit when window is closed
  Overrides:
    `processWindowEvent` in class `JFrame`

### getListeners

    public static Map getListeners()

  Returns the listeners map, a map that holds all the listeners that are singletons (e.g. the status listener that updates the status bar on the main frame or the progress listener that updates the progress bar on the main frame). The keys used are the class names of the listener interface and the values are the actual listeners (e.g "gate.event.StatusListener" -> this). The returned map is the actual data member used to store the listeners so any changes in this map will be visible to everyone.

### getGuiRoots

    public static Collection getGuiRoots()