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.HelpAboutAction
           
(package private)  class MainFrame.LocaleSelectorMenuItem
           
(package private)  class MainFrame.NewAnnotDiffAction
          Makes the necessary GUI adjustements when a new project becomes current.
(package private)  class MainFrame.NewApplicationAction
           
(package private)  class MainFrame.NewBootStrapAction
           
(package private)  class MainFrame.NewDSAction
           
(package private)  class MainFrame.NewLRAction
           
(package private)  class MainFrame.NewPRAction
           
(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
           
 
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)  ApperanceDialog appearanceDialog
           
(package private)  DefaultMutableTreeNode applicationsRoot
           
(package private)  JPopupMenu appsPopup
           
(package private)  DefaultMutableTreeNode datastoresRoot
           
(package private)  JPopupMenu dssPopup
           
(package private) static JFileChooser fileChooser
           
(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
           
(package private)  LogArea logArea
           
(package private)  TabBlinker logBlinker
           
(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)  MainFrame.NewApplicationAction newApplicationAction
           
(package private)  MainFrame.NewBootStrapAction newBootStrapAction
           
(package private)  MainFrame.NewDSAction newDSAction
           
(package private)  MainFrame.NewLRAction newLRAction
           
(package private)  JMenu newLrMenu
          used in menu bar
(package private)  JMenu newLrsPopupMenu
          used in popups
(package private)  MainFrame.NewPRAction newPRAction
           
(package private)  JMenu newPrMenu
           
(package private)  JMenu newPrsPopupMenu
           
(package private)  NewResourceDialog newResourceDialog
           
(package private)  MainFrame.OpenDSAction openDSAction
           
(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)  Component[] targets
          all the top level containers of this application; needed for changes of look and feel
(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
(package private) static void ()
           
 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 Icon getIcon(String filename)
           
protected  void initGuiComponents()
           
protected  void initListeners()
           
protected  void initLocalData()
           
 void jMenuFileExit_actionPerformed(ActionEvent e)
          File | Exit action performed
 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(ResourceHandle 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
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

newLrMenu

JMenu newLrMenu
used in menu bar

newPrMenu

JMenu newPrMenu

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

ApperanceDialog appearanceDialog

animator

MainFrame.CartoonMinder animator

logBlinker

TabBlinker logBlinker

newResourceDialog

NewResourceDialog newResourceDialog

waitDialog

WaitDialog waitDialog

newApplicationAction

MainFrame.NewApplicationAction newApplicationAction

newLRAction

MainFrame.NewLRAction newLRAction

newPRAction

MainFrame.NewPRAction newPRAction

newDSAction

MainFrame.NewDSAction newDSAction

openDSAction

MainFrame.OpenDSAction openDSAction

helpAboutAction

MainFrame.HelpAboutAction helpAboutAction

newAnnotDiffAction

MainFrame.NewAnnotDiffAction newAnnotDiffAction

newBootStrapAction

MainFrame.NewBootStrapAction newBootStrapAction

targets

Component[] targets
all the top level containers of this application; needed for changes of look and feel

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.
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(ResourceHandle 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

static void ()

jMenuFileExit_actionPerformed

public void jMenuFileExit_actionPerformed(ActionEvent e)
File | Exit action performed

processWindowEvent

protected void processWindowEvent(WindowEvent e)
Overridden so we can exit when window is closed
Overrides:
processWindowEvent in class JFrame