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:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,javax.accessibility.Accessible
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public class MainFrame extends javax.swing.JFrame
Class comment for MainFrame.java goes here.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
aeDirPref
static java.lang.String
annotViewSizePref
static java.lang.String
DEFAULT_STYLE_NAME
static java.lang.String
fsTreeSizePref
static java.lang.String
heightSuffix
static java.lang.String
indexTreeSizePref
static java.util.List<Level>
logLevels
static java.lang.String
logViewSizePref
static java.lang.String
textDirPref
static java.lang.String
textSizePref
static java.lang.String
tsWindowSizePref
static java.lang.String
widthSuffix
static java.lang.String
xcasDirPref
-
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
-
-
Constructor Summary
Constructors Constructor Description MainFrame(java.io.File iniFile)
Constructor for MainFrame.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLanguage(java.lang.String language1)
boolean
confirmOverwrite(java.io.File f)
void
createCodePages()
void
createLanguages()
void
destroyAe()
AnalysisEngine
getAe()
java.io.File
getAnnotOpenDir()
CAS
getCas()
java.lang.String
getCodePage()
java.util.List<java.lang.String>
getCodePages()
java.io.File
getColorSettingFile()
java.io.File
getColorSettingsDir()
java.lang.String
getDataPathName()
java.awt.Dimension
getDimension(java.lang.String propPrefix)
java.io.File
getFileOpenDir()
javax.swing.JTree
getFsTree()
FSIndex
getIndex()
java.lang.String
getIndexLabel()
javax.swing.JTree
getIndexTree()
java.lang.String
getLanguage()
java.lang.String
getLanguagePrefsList()
java.util.List<java.lang.String>
getLanguages()
java.util.Properties
getPreferences()
java.util.Map<java.lang.String,javax.swing.text.Style>
getStyleMap()
javax.swing.JTextArea
getTextArea()
java.io.File
getTextFile()
UndoMgr
getUndoMgr()
java.io.File
getXcasFileOpenDir()
void
handleException(java.lang.Throwable e)
protected void
handleException(java.lang.Throwable e, java.lang.StringBuffer msg)
void
handleSofas()
protected void
internalRunAE(boolean doCasReset)
boolean
isAnnotationIndex()
boolean
isDirty()
boolean
isExitOnClose()
void
loadAEDescriptor(java.io.File descriptorFile)
void
loadColorPreferences(java.io.File file)
void
loadFile()
void
loadTextFile(java.io.File textFile1)
Load a text file.void
loadXmiFile(java.io.File xmiCasFile)
void
resetCPMenu()
void
resetCursor()
void
resetLangMenu()
void
resetTrees()
void
runAE(boolean doCasReset)
void
runCPC()
void
saveColorPreferences(java.io.File file)
boolean
saveFile()
void
saveProgramPreferences()
void
setAllAnnotationViewerItemEnable(boolean enabled)
void
setAnnotationIndex(boolean isAnnotationIndex)
void
setAnnotOpenDir(java.io.File annotOpenDir)
void
setCaretStatus(int dot, int mark)
void
setCas(CAS cas)
void
setCodePage(java.lang.String codePage)
void
setColorSettingFile(java.io.File colorSettingFile)
void
setColorSettingsDir(java.io.File colorSettingsDir)
void
setDataPath(java.lang.String dataPath)
void
setDataPathName(java.lang.String dataPathName)
void
setDirty(boolean isDirty)
void
setEnableCasFileReadingAndWriting()
void
setExitOnClose(boolean exitOnClose)
Set exit-on-close behavior.void
setFileOpenDir(java.io.File fileOpenDir)
void
setFileStatusMessage()
void
setIndex(FSIndex index)
void
setIndexLabel(java.lang.String indexLabel)
void
setLanguage(java.lang.String language)
void
setLanguagePrefsList(java.lang.String languagePrefsList)
void
setPreferredSize(javax.swing.JComponent comp, java.lang.String propPrefix)
void
setRerunEnabled(boolean enabled)
void
setRunOnCasEnabled()
void
setSaveTextFileEnable(boolean enabled)
void
setStatusbarMessage(java.lang.String message)
void
setText(java.lang.String text)
Set the text to be analyzed.void
setTextFile(java.io.File textFile)
void
setTextNoTitle(java.lang.String text)
void
setTitle()
void
setTypeSystemViewerEnabled(boolean enabled)
void
setUndoEnabled(boolean enabled)
protected boolean
setupAE(java.io.File aeFile)
void
setXcasFileOpenDir(java.io.File xcasFileOpenDir)
void
showTextPopup(int x, int y)
void
updateFSTree(java.lang.String indexName, FSIndex index1)
void
updateIndexTree(boolean useCAS)
-
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
-
-
-
-
Field Detail
-
logLevels
public static java.util.List<Level> logLevels
-
textDirPref
public static final java.lang.String textDirPref
- See Also:
- Constant Field Values
-
aeDirPref
public static final java.lang.String aeDirPref
- See Also:
- Constant Field Values
-
xcasDirPref
public static final java.lang.String xcasDirPref
- See Also:
- Constant Field Values
-
textSizePref
public static final java.lang.String textSizePref
- See Also:
- Constant Field Values
-
indexTreeSizePref
public static final java.lang.String indexTreeSizePref
- See Also:
- Constant Field Values
-
fsTreeSizePref
public static final java.lang.String fsTreeSizePref
- See Also:
- Constant Field Values
-
tsWindowSizePref
public static final java.lang.String tsWindowSizePref
- See Also:
- Constant Field Values
-
annotViewSizePref
public static final java.lang.String annotViewSizePref
- See Also:
- Constant Field Values
-
logViewSizePref
public static final java.lang.String logViewSizePref
- See Also:
- Constant Field Values
-
widthSuffix
public static final java.lang.String widthSuffix
- See Also:
- Constant Field Values
-
heightSuffix
public static final java.lang.String heightSuffix
- See Also:
- Constant Field Values
-
DEFAULT_STYLE_NAME
public static final java.lang.String DEFAULT_STYLE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
runAE
public void runAE(boolean doCasReset)
-
runCPC
public void runCPC()
-
setDataPath
public void setDataPath(java.lang.String dataPath)
-
loadAEDescriptor
public void loadAEDescriptor(java.io.File descriptorFile)
-
handleException
public void handleException(java.lang.Throwable e)
-
handleException
protected void handleException(java.lang.Throwable e, java.lang.StringBuffer msg)
-
loadFile
public void loadFile()
-
loadXmiFile
public void loadXmiFile(java.io.File xmiCasFile)
-
setText
public void setText(java.lang.String text)
Set the text to be analyzed.- Parameters:
text
- The text.
-
loadTextFile
public void loadTextFile(java.io.File textFile1)
Load a text file.- Parameters:
textFile1
- The text file.
-
setTextNoTitle
public void setTextNoTitle(java.lang.String text)
-
setTitle
public void setTitle()
-
saveFile
public boolean saveFile()
-
confirmOverwrite
public boolean confirmOverwrite(java.io.File f)
-
setEnableCasFileReadingAndWriting
public final void setEnableCasFileReadingAndWriting()
-
resetCursor
public final void resetCursor()
-
createCodePages
public void createCodePages()
-
resetTrees
public void resetTrees()
-
resetCPMenu
public void resetCPMenu()
-
addLanguage
public void addLanguage(java.lang.String language1)
-
resetLangMenu
public void resetLangMenu()
-
createLanguages
public void createLanguages()
-
setCaretStatus
public void setCaretStatus(int dot, int mark)
-
setFileStatusMessage
public void setFileStatusMessage()
-
setStatusbarMessage
public void setStatusbarMessage(java.lang.String message)
-
setupAE
protected boolean setupAE(java.io.File aeFile)
-
internalRunAE
protected void internalRunAE(boolean doCasReset)
-
updateIndexTree
public void updateIndexTree(boolean useCAS)
-
updateFSTree
public void updateFSTree(java.lang.String indexName, FSIndex index1)
-
setPreferredSize
public void setPreferredSize(javax.swing.JComponent comp, java.lang.String propPrefix)
-
getDimension
public java.awt.Dimension getDimension(java.lang.String propPrefix)
-
saveProgramPreferences
public void saveProgramPreferences() throws java.io.IOException
- Throws:
java.io.IOException
-
saveColorPreferences
public void saveColorPreferences(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
loadColorPreferences
public void loadColorPreferences(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
showTextPopup
public void showTextPopup(int x, int y)
-
getIndexTree
public javax.swing.JTree getIndexTree()
-
getFsTree
public javax.swing.JTree getFsTree()
-
getTextArea
public javax.swing.JTextArea getTextArea()
-
getCas
public CAS getCas()
-
isDirty
public boolean isDirty()
-
setDirty
public void setDirty(boolean isDirty)
-
getPreferences
public java.util.Properties getPreferences()
-
getIndexLabel
public java.lang.String getIndexLabel()
-
getIndex
public FSIndex getIndex()
-
getStyleMap
public java.util.Map<java.lang.String,javax.swing.text.Style> getStyleMap()
-
getAe
public AnalysisEngine getAe()
-
setIndexLabel
public void setIndexLabel(java.lang.String indexLabel)
-
isAnnotationIndex
public boolean isAnnotationIndex()
-
setAnnotationIndex
public void setAnnotationIndex(boolean isAnnotationIndex)
-
setIndex
public void setIndex(FSIndex index)
-
setAllAnnotationViewerItemEnable
public void setAllAnnotationViewerItemEnable(boolean enabled)
-
getFileOpenDir
public java.io.File getFileOpenDir()
-
setFileOpenDir
public void setFileOpenDir(java.io.File fileOpenDir)
-
getTextFile
public java.io.File getTextFile()
-
setTextFile
public void setTextFile(java.io.File textFile)
-
setSaveTextFileEnable
public void setSaveTextFileEnable(boolean enabled)
-
getUndoMgr
public UndoMgr getUndoMgr()
-
setUndoEnabled
public void setUndoEnabled(boolean enabled)
-
getXcasFileOpenDir
public java.io.File getXcasFileOpenDir()
-
setXcasFileOpenDir
public void setXcasFileOpenDir(java.io.File xcasFileOpenDir)
-
setCas
public void setCas(CAS cas)
-
setRunOnCasEnabled
public void setRunOnCasEnabled()
-
destroyAe
public void destroyAe()
-
setRerunEnabled
public void setRerunEnabled(boolean enabled)
-
setTypeSystemViewerEnabled
public void setTypeSystemViewerEnabled(boolean enabled)
-
getColorSettingsDir
public java.io.File getColorSettingsDir()
-
setColorSettingsDir
public void setColorSettingsDir(java.io.File colorSettingsDir)
-
getColorSettingFile
public java.io.File getColorSettingFile()
-
setColorSettingFile
public void setColorSettingFile(java.io.File colorSettingFile)
-
getAnnotOpenDir
public java.io.File getAnnotOpenDir()
-
setAnnotOpenDir
public void setAnnotOpenDir(java.io.File annotOpenDir)
-
getDataPathName
public java.lang.String getDataPathName()
-
setDataPathName
public void setDataPathName(java.lang.String dataPathName)
-
getCodePage
public java.lang.String getCodePage()
-
setCodePage
public void setCodePage(java.lang.String codePage)
-
getCodePages
public java.util.List<java.lang.String> getCodePages()
-
getLanguage
public java.lang.String getLanguage()
-
setLanguage
public void setLanguage(java.lang.String language)
-
getLanguages
public java.util.List<java.lang.String> getLanguages()
-
getLanguagePrefsList
public java.lang.String getLanguagePrefsList()
-
setLanguagePrefsList
public void setLanguagePrefsList(java.lang.String languagePrefsList)
-
handleSofas
public void handleSofas()
-
isExitOnClose
public boolean isExitOnClose()
-
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
-
-
-