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
public class MainFrame extends JFrame
Class comment for MainFrame.java goes here.- See Also:
- Serialized Form
-
-
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
Fields Modifier and Type Field Description static String
aeDirPref
static String
annotViewSizePref
static String
DEFAULT_STYLE_NAME
static String
fsTreeSizePref
static String
heightSuffix
static String
indexTreeSizePref
static List<Level>
logLevels
static String
logViewSizePref
static String
textDirPref
static String
textSizePref
static String
tsWindowSizePref
static String
widthSuffix
static String
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
-
-
Method Summary
-
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 Detail
-
textDirPref
public static final String textDirPref
- See Also:
- Constant Field Values
-
aeDirPref
public static final String aeDirPref
- See Also:
- Constant Field Values
-
xcasDirPref
public static final String xcasDirPref
- See Also:
- Constant Field Values
-
textSizePref
public static final String textSizePref
- See Also:
- Constant Field Values
-
indexTreeSizePref
public static final String indexTreeSizePref
- See Also:
- Constant Field Values
-
fsTreeSizePref
public static final String fsTreeSizePref
- See Also:
- Constant Field Values
-
tsWindowSizePref
public static final String tsWindowSizePref
- See Also:
- Constant Field Values
-
annotViewSizePref
public static final String annotViewSizePref
- See Also:
- Constant Field Values
-
logViewSizePref
public static final String logViewSizePref
- See Also:
- Constant Field Values
-
widthSuffix
public static final String widthSuffix
- See Also:
- Constant Field Values
-
heightSuffix
public static final String heightSuffix
- See Also:
- Constant Field Values
-
DEFAULT_STYLE_NAME
public static final String DEFAULT_STYLE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MainFrame
public MainFrame(File iniFile)
Constructor for MainFrame.- Throws:
HeadlessException
- -
-
-
Method Detail
-
runAE
public void runAE(boolean doCasReset)
-
runCPC
public void runCPC()
-
setDataPath
public void setDataPath(String dataPath)
-
loadAEDescriptor
public void loadAEDescriptor(File descriptorFile)
-
handleException
public void handleException(Throwable e)
-
handleException
protected void handleException(Throwable e, StringBuffer msg)
-
loadFile
public void loadFile()
-
loadXmiFile
public void loadXmiFile(File xmiCasFile)
-
setText
public void setText(String text)
Set the text to be analyzed.- Parameters:
text
- The text.
-
loadTextFile
public void loadTextFile(File textFile1)
Load a text file.- Parameters:
textFile1
- The text file.
-
setTextNoTitle
public void setTextNoTitle(String text)
-
setTitle
public void setTitle()
-
saveFile
public boolean saveFile()
-
confirmOverwrite
public boolean confirmOverwrite(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(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(String message)
-
setupAE
protected boolean setupAE(File aeFile)
-
internalRunAE
protected void internalRunAE(boolean doCasReset)
-
updateIndexTree
public void updateIndexTree(boolean useCAS)
-
setPreferredSize
public void setPreferredSize(JComponent comp, String propPrefix)
-
saveProgramPreferences
public void saveProgramPreferences() throws IOException
- Throws:
IOException
-
saveColorPreferences
public void saveColorPreferences(File file) throws IOException
- Throws:
IOException
-
loadColorPreferences
public void loadColorPreferences(File file) throws IOException
- Throws:
IOException
-
showTextPopup
public void showTextPopup(int x, int y)
-
getIndexTree
public JTree getIndexTree()
-
getFsTree
public JTree getFsTree()
-
getTextArea
public JTextArea getTextArea()
-
getCas
public CAS getCas()
-
isDirty
public boolean isDirty()
-
setDirty
public void setDirty(boolean isDirty)
-
getPreferences
public Properties getPreferences()
-
getIndexLabel
public String getIndexLabel()
-
getIndex
public FSIndex getIndex()
-
getAe
public AnalysisEngine getAe()
-
setIndexLabel
public void setIndexLabel(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 File getFileOpenDir()
-
setFileOpenDir
public void setFileOpenDir(File fileOpenDir)
-
getTextFile
public File getTextFile()
-
setTextFile
public void setTextFile(File textFile)
-
setSaveTextFileEnable
public void setSaveTextFileEnable(boolean enabled)
-
getUndoMgr
public UndoMgr getUndoMgr()
-
setUndoEnabled
public void setUndoEnabled(boolean enabled)
-
getXcasFileOpenDir
public File getXcasFileOpenDir()
-
setXcasFileOpenDir
public void setXcasFileOpenDir(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 File getColorSettingsDir()
-
setColorSettingsDir
public void setColorSettingsDir(File colorSettingsDir)
-
getColorSettingFile
public File getColorSettingFile()
-
setColorSettingFile
public void setColorSettingFile(File colorSettingFile)
-
getAnnotOpenDir
public File getAnnotOpenDir()
-
setAnnotOpenDir
public void setAnnotOpenDir(File annotOpenDir)
-
getDataPathName
public String getDataPathName()
-
setDataPathName
public void setDataPathName(String dataPathName)
-
getCodePage
public String getCodePage()
-
setCodePage
public void setCodePage(String codePage)
-
getLanguage
public String getLanguage()
-
setLanguage
public void setLanguage(String language)
-
getLanguagePrefsList
public String getLanguagePrefsList()
-
setLanguagePrefsList
public void setLanguagePrefsList(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
-
-
-