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 TypeFieldDescriptionprivate JMenuItem
private AnalysisEngine
private File
static final String
private JTextField
private JMenuItem
private File
static final String
private JTextField
private CAS
private String
private static final String
private static final String
private File
private File
private Action
private ButtonGroup
private static final String
private JMenu
private Action
private String
private static final String
static final String
private static final String
private static final String
private static final String
private JMenu
private boolean
private JMenu
private File
private JMenuItem
private JTextField
private JTree
private static final Dimension
private JScrollPane
static final String
static final String
(package private) static final String
private FSIndex
private String
private static final String
private JTree
private JScrollPane
static final String
private File
private boolean
private boolean
private ButtonGroup
private static final String
private static final String
private JMenu
private String
private static final String
(package private) String
private ProcessTrace
private Logger
private File
private static final Dimension
private static final String
static final String
private static final int
private static final String
private Properties
private JMenu
private final RecentFilesList
private JMenu
private final RecentFilesList
private JMenuItem
private JMenuItem
private JMenuItem
private static final Color
private static final long
private JMenuItem
private JComboBox
private JPanel
private JTextField
private JPanel
private JTextArea
private static final Dimension
static final String
private File
private static final String
private JPopupMenu
private JScrollPane
static final String
private Border
private static final String
private JMenuItem
static final String
private JMenuItem
private JMenuItem
private JMenuItem
private UndoMgr
static final String
static final String
private File
private JMenuItem
private JMenuItem
private JMenuItem
private JMenuItem
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, 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, HIDE_ON_CLOSE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate final void
void
addLanguage
(String language1) private void
addRecentDescFile
(File file) private void
addRecentTextFile
(File file) boolean
void
private void
private JMenu
private void
private JMenu
private void
void
private JMenuBar
private final JMenuItem
createRecentDescFileItem
(int num, File file) private final JMenuItem
createRecentTextFileItem
(int num, File file) private JMenu
private void
private void
private JMenu
private DefaultMutableTreeNode
createTypeTree
(Type type, TypeSystem ts, String label, FSIndexRepository ir) private void
void
getAe()
getAnnotationsAtPos
(int pos, List<FSNode> annots) getCas()
getDimension
(String propPrefix) getIndex()
private static final int
getMnemonic
(int i) void
protected void
handleException
(Throwable e, StringBuffer msg) void
private void
init()
private final void
initCas()
private final void
private void
private void
private void
private void
protected void
internalRunAE
(boolean doCasReset) boolean
boolean
isDirty()
boolean
void
loadAEDescriptor
(File descriptorFile) void
loadColorPreferences
(File file) void
loadFile()
private void
void
loadTextFile
(File textFile1) Load a text file.void
loadXmiFile
(File xmiCasFile) private void
void
final void
void
void
void
runAE
(boolean doCasReset) void
runCPC()
void
saveColorPreferences
(File file) boolean
saveFile()
void
private void
void
setAllAnnotationViewerItemEnable
(boolean enabled) void
setAnnotationIndex
(boolean isAnnotationIndex) void
setAnnotOpenDir
(File annotOpenDir) void
setCaretStatus
(int dot, int mark) void
void
setCodePage
(String codePage) void
setColorSettingFile
(File colorSettingFile) void
setColorSettingsDir
(File colorSettingsDir) void
setDataPath
(String dataPath) void
setDataPathName
(String dataPathName) void
setDirty
(boolean isDirty) final void
void
setExitOnClose
(boolean exitOnClose) Set exit-on-close behavior.void
setFileOpenDir
(File fileOpenDir) void
void
void
setIndexLabel
(String indexLabel) void
setLanguage
(String language) void
setLanguagePrefsList
(String languagePrefsList) void
setPreferredSize
(JComponent comp, String propPrefix) void
setRerunEnabled
(boolean enabled) void
void
setSaveTextFileEnable
(boolean enabled) void
setStatusbarMessage
(String message) void
Set the text to be analyzed.void
setTextFile
(File textFile) void
setTextNoTitle
(String text) void
setTitle()
void
setTypeSystemViewerEnabled
(boolean enabled) void
setUndoEnabled
(boolean enabled) protected boolean
private final void
void
setXcasFileOpenDir
(File xcasFileOpenDir) private void
void
showTextPopup
(int x, int y) private static final String
stringListToString
(List<String> list) void
updateFSTree
(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, getPeer, 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, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, 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
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
logLevels
-
loggerPropertiesFileName
- See Also:
-
defaultText
- See Also:
-
titleText
- See Also:
-
htmlGrayColor
- See Also:
-
indexReposRootLabel
- See Also:
-
noIndexReposLabel
- See Also:
-
textArea
-
indexTree
-
fsTree
-
statusPanel
-
statusBar
-
fileStatus
-
aeStatus
-
caretStatus
-
textTitleBorder
-
isDirty
private boolean isDirty -
textScrollPane
-
indexTreeScrollPane
-
fsTreeScrollPane
-
fileMenu
-
fileSaveItem
-
editMenu
-
undoItem
-
undoMgr
-
cutAction
-
copyAction
-
allAnnotationViewerItem
-
acdItem
-
tsViewerItem
-
reRunMenu
-
runCPCMenu
-
runOnCasMenuItem
-
showPerfReportItem
-
textPopup
-
xcasReadItem
-
xcasWriteItem
-
xmiCasReadItem
-
xmiCasWriteItem
-
typeSystemWriteItem
-
typeSystemReadItem
-
recentTextFileMenu
-
recentDescFileMenu
-
iniFile
-
codePages
-
codePage
-
cpMenu
-
cpButtons
-
languagePrefsList
String languagePrefsList -
languages
-
langMenu
-
langButtons
-
LANGUAGE_DEFAULT
- See Also:
-
language
-
defaultLanguages
- See Also:
-
textFile
-
fileOpenDir
-
annotOpenDir
-
xcasFileOpenDir
-
colorSettingsDir
-
indexLabel
-
index
-
isAnnotationIndex
private boolean isAnnotationIndex -
cas
-
aeDescriptorFile
-
ae
-
logFile
-
log
-
colorSettingFile
-
selectionColor
-
preferences
-
lastRunProcessTrace
-
textDirPref
- See Also:
-
aeDirPref
- See Also:
-
xcasDirPref
- See Also:
-
textSizePref
- See Also:
-
indexTreeSizePref
- See Also:
-
fsTreeSizePref
- See Also:
-
tsWindowSizePref
- See Also:
-
annotViewSizePref
- See Also:
-
logViewSizePref
- See Also:
-
widthSuffix
- See Also:
-
heightSuffix
- See Also:
-
colorFilePref
- See Also:
-
colorDirPref
- See Also:
-
cpCurrentPref
- See Also:
-
langCurrentPref
- See Also:
-
langListPref
- See Also:
-
textFileListPref
- See Also:
-
descFileListPref
- See Also:
-
dataPathPref
- See Also:
-
textDimensionDefault
-
fsTreeDimensionDefault
-
logFileDimensionDefault
-
DEFAULT_STYLE_NAME
- See Also:
-
styleMap
-
maxRecentSize
private static final int maxRecentSize- See Also:
-
recentTextFiles
-
textFileNameList
-
recentDescFiles
-
descFileNameList
-
cursorOwningComponents
-
cursorCache
-
dataPathName
-
sofaSelectionComboBox
-
sofaSelectionPanel
-
exitOnClose
private boolean exitOnClose
-
-
Constructor Details
-
MainFrame
Constructor for MainFrame.- Throws:
HeadlessException
- -
-
-
Method Details
-
runAE
public void runAE(boolean doCasReset) -
runCPC
public void runCPC() -
setDataPath
-
loadAEDescriptor
-
handleException
-
handleException
-
showError
-
loadFile
public void loadFile() -
loadXmiFile
-
getMnemonic
private static final int getMnemonic(int i) -
createRecentTextFileItem
-
addRecentTextFile
-
createRecentDescFileItem
-
addRecentDescFile
-
setText
Set the text to be analyzed.- Parameters:
text
- The text.
-
loadTextFile
Load a text file.- Parameters:
textFile1
- The text file.
-
setTextNoTitle
-
setTitle
public void setTitle() -
saveFile
public boolean saveFile() -
confirmOverwrite
-
createTextArea
private void createTextArea() -
populateEditMenu
private void populateEditMenu() -
createEditActionMap
-
createMenuBar
-
createEditMenu
-
createHelpMenu
-
createFileMenu
private void createFileMenu() -
setEnableCasFileReadingAndWriting
public final void setEnableCasFileReadingAndWriting() -
addCursorOwningComponent
-
setWaitCursor
private final void setWaitCursor() -
resetCursor
public final void resetCursor() -
createCodePages
public void createCodePages() -
resetTrees
public void resetTrees() -
createCPMenu
private void createCPMenu() -
resetCPMenu
public void resetCPMenu() -
addLanguage
-
createLangMenu
private void createLangMenu() -
resetLangMenu
public void resetLangMenu() -
createLanguages
public void createLanguages() -
createRunMenu
-
createToolsMenu
-
createStatusBar
private void createStatusBar() -
setCaretStatus
public void setCaretStatus(int dot, int mark) -
setFileStatusMessage
public void setFileStatusMessage() -
setAEStatusMessage
private void setAEStatusMessage() -
setStatusbarMessage
-
initializeLogging
private void initializeLogging() -
init
private void init() -
initFileLists
private final void initFileLists() -
setupAE
-
initCas
private final void initCas() -
internalRunAE
protected void internalRunAE(boolean doCasReset) -
initIRTree
private void initIRTree() -
initFSTree
private void initFSTree() -
deleteFSTree
private void deleteFSTree() -
updateIndexTree
public void updateIndexTree(boolean useCAS) -
updateFSTree
-
getAnnotationsAtPos
-
createTypeTree
private DefaultMutableTreeNode createTypeTree(Type type, TypeSystem ts, String label, FSIndexRepository ir) -
loadProgramPreferences
- Throws:
IOException
-
setPreferredSize
-
getDimension
-
stringListToString
-
stringToArrayList
-
saveProgramPreferences
- Throws:
IOException
-
saveColorPreferences
- Throws:
IOException
-
loadColorPreferences
- Throws:
IOException
-
initKeyMap
private void initKeyMap() -
showTextPopup
public void showTextPopup(int x, int y) -
getIndexTree
-
getFsTree
-
getTextArea
-
getCas
-
isDirty
public boolean isDirty() -
setDirty
public void setDirty(boolean isDirty) -
getPreferences
-
getIndexLabel
-
getIndex
-
getStyleMap
-
getAe
-
setIndexLabel
-
isAnnotationIndex
public boolean isAnnotationIndex() -
setAnnotationIndex
public void setAnnotationIndex(boolean isAnnotationIndex) -
setIndex
-
setAllAnnotationViewerItemEnable
public void setAllAnnotationViewerItemEnable(boolean enabled) -
getFileOpenDir
-
setFileOpenDir
-
getTextFile
-
setTextFile
-
setSaveTextFileEnable
public void setSaveTextFileEnable(boolean enabled) -
getUndoMgr
-
setUndoEnabled
public void setUndoEnabled(boolean enabled) -
getXcasFileOpenDir
-
setXcasFileOpenDir
-
setCas
-
setRunOnCasEnabled
public void setRunOnCasEnabled() -
destroyAe
public void destroyAe() -
setRerunEnabled
public void setRerunEnabled(boolean enabled) -
setTypeSystemViewerEnabled
public void setTypeSystemViewerEnabled(boolean enabled) -
getColorSettingsDir
-
setColorSettingsDir
-
getColorSettingFile
-
setColorSettingFile
-
getAnnotOpenDir
-
setAnnotOpenDir
-
getDataPathName
-
setDataPathName
-
getCodePage
-
setCodePage
-
getCodePages
-
getLanguage
-
setLanguage
-
getLanguages
-
getLanguagePrefsList
-
setLanguagePrefsList
-
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
-
-