Package org.apache.uima.tools.cvd
Class MainFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.apache.uima.tools.cvd.MainFrame
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
,RootPaneContainer
,WindowConstants
Class comment for MainFrame.java goes here.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.Type
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
FieldsModifier and TypeFieldDescriptionstatic final String
The Constant aeDirPref.static final String
The Constant annotViewSizePref.static final String
The Constant DEFAULT_STYLE_NAME.static final String
The Constant fsTreeSizePref.static final String
The Constant heightSuffix.static final String
The Constant indexTreeSizePref.The log levels.static final String
The Constant logViewSizePref.static final String
The Constant textDirPref.static final String
The Constant textSizePref.static final String
The Constant tsWindowSizePref.static final String
The Constant widthSuffix.static final String
The Constant xcasDirPref.Fields inherited from class javax.swing.JFrame
accessibleContext, 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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLanguage
(String language1) Adds the language.boolean
Confirm overwrite.void
Creates the code pages.void
Creates the languages.void
Destroy ae.getAe()
Gets the ae.Gets the annot open dir.getCas()
Gets the cas.Gets the code page.Gets the code pages.Gets the color setting file.Gets the color settings dir.Gets the data path name.getDimension
(String propPrefix) Gets the dimension.Gets the file open dir.Gets the fs tree.getIndex()
Gets the index.Gets the index label.Gets the index tree.Gets the language.Gets the language prefs list.Gets the languages.Gets the preferences.Gets the style map.Gets the text area.Gets the text file.Gets the undo mgr.Gets the xcas file open dir.void
Handle exception.protected void
handleException
(Throwable e, StringBuffer msg) Handle exception.void
Handle sofas.protected void
internalRunAE
(boolean doCasReset) Internal run AE.boolean
Checks if is annotation index.boolean
isDirty()
Checks if is dirty.boolean
Checks if is exit on close.void
loadAEDescriptor
(File descriptorFile) Load AE descriptor.void
loadColorPreferences
(File file) Load color preferences.void
loadFile()
Load file.void
loadTextFile
(File textFile1) Load a text file.void
loadXmiFile
(File xmiCasFile) Load xmi file.void
Reset CP menu.final void
Reset cursor.void
Reset lang menu.void
Reset trees.void
runAE
(boolean doCasReset) Run AE.void
runCPC()
Run CPC.void
saveColorPreferences
(File file) Save color preferences.boolean
saveFile()
Save file.void
Save program preferences.void
setAllAnnotationViewerItemEnable
(boolean enabled) Sets the all annotation viewer item enable.void
setAnnotationIndex
(boolean isAnnotationIndex) Sets the annotation index.void
setAnnotOpenDir
(File annotOpenDir) Sets the annot open dir.void
setCaretStatus
(int dot, int mark) Sets the caret status.void
Sets the cas.void
setCodePage
(String codePage) Sets the code page.void
setColorSettingFile
(File colorSettingFile) Sets the color setting file.void
setColorSettingsDir
(File colorSettingsDir) Sets the color settings dir.void
setDataPath
(String dataPath) Sets the data path.void
setDataPathName
(String dataPathName) Sets the data path name.void
setDirty
(boolean isDirty) Sets the dirty.final void
Sets the enable cas file reading and writing.void
setExitOnClose
(boolean exitOnClose) Set exit-on-close behavior.void
setFileOpenDir
(File fileOpenDir) Sets the file open dir.void
Sets the file status message.void
Sets the index.void
setIndexLabel
(String indexLabel) Sets the index label.void
setLanguage
(String language) Sets the language.void
setLanguagePrefsList
(String languagePrefsList) Sets the language prefs list.void
setPreferredSize
(JComponent comp, String propPrefix) Sets the preferred size.void
setRerunEnabled
(boolean enabled) Sets the rerun enabled.void
Sets the run on cas enabled.void
setSaveTextFileEnable
(boolean enabled) Sets the save text file enable.void
setStatusbarMessage
(String message) Sets the statusbar message.void
Set the text to be analyzed.void
setTextFile
(File textFile) Sets the text file.void
setTextNoTitle
(String text) Sets the text no title.void
setTitle()
Sets the title.void
setTypeSystemViewerEnabled
(boolean enabled) Sets the type system viewer enabled.void
setUndoEnabled
(boolean enabled) Sets the undo enabled.protected boolean
Setup AE.void
setXcasFileOpenDir
(File xcasFileOpenDir) Sets the xcas file open dir.void
showTextPopup
(int x, int y) Show text popup.void
updateFSTree
(String indexName, FSIndex index1) Update FS tree.void
updateIndexTree
(boolean useCAS) Update index tree.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, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, 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, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, 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
-
Field Details
-
logLevels
The log levels. -
textDirPref
The Constant textDirPref.- See Also:
-
aeDirPref
The Constant aeDirPref.- See Also:
-
xcasDirPref
The Constant xcasDirPref.- See Also:
-
textSizePref
The Constant textSizePref.- See Also:
-
indexTreeSizePref
The Constant indexTreeSizePref.- See Also:
-
fsTreeSizePref
The Constant fsTreeSizePref.- See Also:
-
tsWindowSizePref
The Constant tsWindowSizePref.- See Also:
-
annotViewSizePref
The Constant annotViewSizePref.- See Also:
-
logViewSizePref
The Constant logViewSizePref.- See Also:
-
widthSuffix
The Constant widthSuffix.- See Also:
-
heightSuffix
The Constant heightSuffix.- See Also:
-
DEFAULT_STYLE_NAME
The Constant DEFAULT_STYLE_NAME.- See Also:
-
-
Constructor Details
-
MainFrame
Constructor for MainFrame.- Parameters:
iniFile
- the ini file- Throws:
HeadlessException
- -
-
-
Method Details
-
runAE
public void runAE(boolean doCasReset) Run AE.- Parameters:
doCasReset
- the do cas reset
-
runCPC
public void runCPC()Run CPC. -
setDataPath
Sets the data path.- Parameters:
dataPath
- the new data path
-
loadAEDescriptor
Load AE descriptor.- Parameters:
descriptorFile
- the descriptor file
-
handleException
Handle exception.- Parameters:
e
- the e
-
handleException
Handle exception.- Parameters:
e
- the emsg
- the msg
-
loadFile
public void loadFile()Load file. -
loadXmiFile
Load xmi file.- Parameters:
xmiCasFile
- the xmi cas file
-
setText
Set the text to be analyzed.- Parameters:
text
- The text.
-
loadTextFile
Load a text file.- Parameters:
textFile1
- The text file.
-
setTextNoTitle
Sets the text no title.- Parameters:
text
- the new text no title
-
setTitle
public void setTitle()Sets the title. -
saveFile
public boolean saveFile()Save file.- Returns:
- true, if successful
-
confirmOverwrite
Confirm overwrite.- Parameters:
f
- the f- Returns:
- true, if successful
-
setEnableCasFileReadingAndWriting
public final void setEnableCasFileReadingAndWriting()Sets the enable cas file reading and writing. -
resetCursor
public final void resetCursor()Reset cursor. -
createCodePages
public void createCodePages()Creates the code pages. -
resetTrees
public void resetTrees()Reset trees. -
resetCPMenu
public void resetCPMenu()Reset CP menu. -
addLanguage
Adds the language.- Parameters:
language1
- the language 1
-
resetLangMenu
public void resetLangMenu()Reset lang menu. -
createLanguages
public void createLanguages()Creates the languages. -
setCaretStatus
public void setCaretStatus(int dot, int mark) Sets the caret status.- Parameters:
dot
- the dotmark
- the mark
-
setFileStatusMessage
public void setFileStatusMessage()Sets the file status message. -
setStatusbarMessage
Sets the statusbar message.- Parameters:
message
- the new statusbar message
-
setupAE
Setup AE.- Parameters:
aeFile
- the ae file- Returns:
- true, if successful
-
internalRunAE
protected void internalRunAE(boolean doCasReset) Internal run AE.- Parameters:
doCasReset
- the do cas reset
-
updateIndexTree
public void updateIndexTree(boolean useCAS) Update index tree.- Parameters:
useCAS
- the use CAS
-
updateFSTree
Update FS tree.- Parameters:
indexName
- the index nameindex1
- the index 1
-
setPreferredSize
Sets the preferred size.- Parameters:
comp
- the comppropPrefix
- the prop prefix
-
getDimension
Gets the dimension.- Parameters:
propPrefix
- the prop prefix- Returns:
- the dimension
-
saveProgramPreferences
Save program preferences.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
saveColorPreferences
Save color preferences.- Parameters:
file
- the file- Throws:
IOException
- Signals that an I/O exception has occurred.
-
loadColorPreferences
Load color preferences.- Parameters:
file
- the file- Throws:
IOException
- Signals that an I/O exception has occurred.
-
showTextPopup
public void showTextPopup(int x, int y) Show text popup.- Parameters:
x
- the xy
- the y
-
getIndexTree
Gets the index tree.- Returns:
- the index tree
-
getFsTree
Gets the fs tree.- Returns:
- the fs tree
-
getTextArea
Gets the text area.- Returns:
- the text area
-
getCas
Gets the cas.- Returns:
- the cas
-
isDirty
public boolean isDirty()Checks if is dirty.- Returns:
- true, if is dirty
-
setDirty
public void setDirty(boolean isDirty) Sets the dirty.- Parameters:
isDirty
- the new dirty
-
getPreferences
Gets the preferences.- Returns:
- the preferences
-
getIndexLabel
Gets the index label.- Returns:
- the index label
-
getIndex
Gets the index.- Returns:
- the index
-
getStyleMap
Gets the style map.- Returns:
- the style map
-
getAe
Gets the ae.- Returns:
- the ae
-
setIndexLabel
Sets the index label.- Parameters:
indexLabel
- the new index label
-
isAnnotationIndex
public boolean isAnnotationIndex()Checks if is annotation index.- Returns:
- true, if is annotation index
-
setAnnotationIndex
public void setAnnotationIndex(boolean isAnnotationIndex) Sets the annotation index.- Parameters:
isAnnotationIndex
- the new annotation index
-
setIndex
Sets the index.- Parameters:
index
- the new index
-
setAllAnnotationViewerItemEnable
public void setAllAnnotationViewerItemEnable(boolean enabled) Sets the all annotation viewer item enable.- Parameters:
enabled
- the new all annotation viewer item enable
-
getFileOpenDir
Gets the file open dir.- Returns:
- the file open dir
-
setFileOpenDir
Sets the file open dir.- Parameters:
fileOpenDir
- the new file open dir
-
getTextFile
Gets the text file.- Returns:
- the text file
-
setTextFile
Sets the text file.- Parameters:
textFile
- the new text file
-
setSaveTextFileEnable
public void setSaveTextFileEnable(boolean enabled) Sets the save text file enable.- Parameters:
enabled
- the new save text file enable
-
getUndoMgr
Gets the undo mgr.- Returns:
- the undo mgr
-
setUndoEnabled
public void setUndoEnabled(boolean enabled) Sets the undo enabled.- Parameters:
enabled
- the new undo enabled
-
getXcasFileOpenDir
Gets the xcas file open dir.- Returns:
- the xcas file open dir
-
setXcasFileOpenDir
Sets the xcas file open dir.- Parameters:
xcasFileOpenDir
- the new xcas file open dir
-
setCas
Sets the cas.- Parameters:
cas
- the new cas
-
setRunOnCasEnabled
public void setRunOnCasEnabled()Sets the run on cas enabled. -
destroyAe
public void destroyAe()Destroy ae. -
setRerunEnabled
public void setRerunEnabled(boolean enabled) Sets the rerun enabled.- Parameters:
enabled
- the new rerun enabled
-
setTypeSystemViewerEnabled
public void setTypeSystemViewerEnabled(boolean enabled) Sets the type system viewer enabled.- Parameters:
enabled
- the new type system viewer enabled
-
getColorSettingsDir
Gets the color settings dir.- Returns:
- the color settings dir
-
setColorSettingsDir
Sets the color settings dir.- Parameters:
colorSettingsDir
- the new color settings dir
-
getColorSettingFile
Gets the color setting file.- Returns:
- the color setting file
-
setColorSettingFile
Sets the color setting file.- Parameters:
colorSettingFile
- the new color setting file
-
getAnnotOpenDir
Gets the annot open dir.- Returns:
- the annot open dir
-
setAnnotOpenDir
Sets the annot open dir.- Parameters:
annotOpenDir
- the new annot open dir
-
getDataPathName
Gets the data path name.- Returns:
- the data path name
-
setDataPathName
Sets the data path name.- Parameters:
dataPathName
- the new data path name
-
getCodePage
Gets the code page.- Returns:
- the code page
-
setCodePage
Sets the code page.- Parameters:
codePage
- the new code page
-
getCodePages
Gets the code pages.- Returns:
- the code pages
-
getLanguage
Gets the language.- Returns:
- the language
-
setLanguage
Sets the language.- Parameters:
language
- the new language
-
getLanguages
Gets the languages.- Returns:
- the languages
-
getLanguagePrefsList
Gets the language prefs list.- Returns:
- the language prefs list
-
setLanguagePrefsList
Sets the language prefs list.- Parameters:
languagePrefsList
- the new language prefs list
-
handleSofas
public void handleSofas()Handle sofas. -
isExitOnClose
public boolean isExitOnClose()Checks if is exit on close.- Returns:
- true, if is exit on close
-
setExitOnClose
public void setExitOnClose(boolean exitOnClose) Set exit-on-close behavior. Normally, CVD will shut down the JVM it's running in when it's main window is being closed. CallingsetExitOnClose(false)
prevents that. It is then the caller's task to shut down the JVM.- Parameters:
exitOnClose
- the new exit on close
-