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.AccessibleJFrameNested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrameNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe Constant aeDirPref.static final StringThe Constant annotViewSizePref.static final StringThe Constant DEFAULT_STYLE_NAME.static final StringThe Constant fsTreeSizePref.static final StringThe Constant heightSuffix.static final StringThe Constant indexTreeSizePref.The log levels.static final StringThe Constant logViewSizePref.static final StringThe Constant textDirPref.static final StringThe Constant textSizePref.static final StringThe Constant tsWindowSizePref.static final StringThe Constant widthSuffix.static final StringThe Constant xcasDirPref.Fields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabledFields 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_CURSORFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields 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 TypeMethodDescriptionvoidaddLanguage(String language1) Adds the language.booleanConfirm overwrite.voidCreates the code pages.voidCreates the languages.voidDestroy 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.voidHandle exception.protected voidhandleException(Throwable e, StringBuffer msg) Handle exception.voidHandle sofas.protected voidinternalRunAE(boolean doCasReset) Internal run AE.booleanChecks if is annotation index.booleanisDirty()Checks if is dirty.booleanChecks if is exit on close.voidloadAEDescriptor(File descriptorFile) Load AE descriptor.voidloadColorPreferences(File file) Load color preferences.voidloadFile()Load file.voidloadTextFile(File textFile1) Load a text file.voidloadXmiFile(File xmiCasFile) Load xmi file.voidReset CP menu.final voidReset cursor.voidReset lang menu.voidReset trees.voidrunAE(boolean doCasReset) Run AE.voidrunCPC()Run CPC.voidsaveColorPreferences(File file) Save color preferences.booleansaveFile()Save file.voidSave program preferences.voidsetAllAnnotationViewerItemEnable(boolean enabled) Sets the all annotation viewer item enable.voidsetAnnotationIndex(boolean isAnnotationIndex) Sets the annotation index.voidsetAnnotOpenDir(File annotOpenDir) Sets the annot open dir.voidsetCaretStatus(int dot, int mark) Sets the caret status.voidSets the cas.voidsetCodePage(String codePage) Sets the code page.voidsetColorSettingFile(File colorSettingFile) Sets the color setting file.voidsetColorSettingsDir(File colorSettingsDir) Sets the color settings dir.voidsetDataPath(String dataPath) Sets the data path.voidsetDataPathName(String dataPathName) Sets the data path name.voidsetDirty(boolean isDirty) Sets the dirty.final voidSets the enable cas file reading and writing.voidsetExitOnClose(boolean exitOnClose) Set exit-on-close behavior.voidsetFileOpenDir(File fileOpenDir) Sets the file open dir.voidSets the file status message.voidSets the index.voidsetIndexLabel(String indexLabel) Sets the index label.voidsetLanguage(String language) Sets the language.voidsetLanguagePrefsList(String languagePrefsList) Sets the language prefs list.voidsetPreferredSize(JComponent comp, String propPrefix) Sets the preferred size.voidsetRerunEnabled(boolean enabled) Sets the rerun enabled.voidSets the run on cas enabled.voidsetSaveTextFileEnable(boolean enabled) Sets the save text file enable.voidsetStatusbarMessage(String message) Sets the statusbar message.voidSet the text to be analyzed.voidsetTextFile(File textFile) Sets the text file.voidsetTextNoTitle(String text) Sets the text no title.voidsetTitle()Sets the title.voidsetTypeSystemViewerEnabled(boolean enabled) Sets the type system viewer enabled.voidsetUndoEnabled(boolean enabled) Sets the undo enabled.protected booleanSetup AE.voidsetXcasFileOpenDir(File xcasFileOpenDir) Sets the xcas file open dir.voidshowTextPopup(int x, int y) Show text popup.voidupdateFSTree(String indexName, FSIndex index1) Update FS tree.voidupdateIndexTree(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, updateMethods 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, setUndecoratedMethods 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, toFrontMethods 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, validateTreeMethods 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, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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
-