Class MainFrame

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class MainFrame extends JFrame
Class comment for MainFrame.java goes here.
See Also:
  • Field Details

  • Constructor Details

    • MainFrame

      public MainFrame(File iniFile)
      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

      public void setDataPath(String dataPath)
      Sets the data path.
      Parameters:
      dataPath - the new data path
    • loadAEDescriptor

      public void loadAEDescriptor(File descriptorFile)
      Load AE descriptor.
      Parameters:
      descriptorFile - the descriptor file
    • handleException

      public void handleException(Throwable e)
      Handle exception.
      Parameters:
      e - the e
    • handleException

      protected void handleException(Throwable e, StringBuffer msg)
      Handle exception.
      Parameters:
      e - the e
      msg - the msg
    • loadFile

      public void loadFile()
      Load file.
    • loadXmiFile

      public void loadXmiFile(File xmiCasFile)
      Load xmi file.
      Parameters:
      xmiCasFile - the xmi cas file
    • 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)
      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

      public boolean confirmOverwrite(File f)
      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

      public void addLanguage(String language1)
      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 dot
      mark - the mark
    • setFileStatusMessage

      public void setFileStatusMessage()
      Sets the file status message.
    • setStatusbarMessage

      public void setStatusbarMessage(String message)
      Sets the statusbar message.
      Parameters:
      message - the new statusbar message
    • setupAE

      protected boolean setupAE(File aeFile)
      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

      public void updateFSTree(String indexName, FSIndex index1)
      Update FS tree.
      Parameters:
      indexName - the index name
      index1 - the index 1
    • setPreferredSize

      public void setPreferredSize(JComponent comp, String propPrefix)
      Sets the preferred size.
      Parameters:
      comp - the comp
      propPrefix - the prop prefix
    • getDimension

      public Dimension getDimension(String propPrefix)
      Gets the dimension.
      Parameters:
      propPrefix - the prop prefix
      Returns:
      the dimension
    • saveProgramPreferences

      public void saveProgramPreferences() throws IOException
      Save program preferences.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • saveColorPreferences

      public void saveColorPreferences(File file) throws IOException
      Save color preferences.
      Parameters:
      file - the file
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • loadColorPreferences

      public void loadColorPreferences(File file) throws IOException
      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 x
      y - the y
    • getIndexTree

      public JTree getIndexTree()
      Gets the index tree.
      Returns:
      the index tree
    • getFsTree

      public JTree getFsTree()
      Gets the fs tree.
      Returns:
      the fs tree
    • getTextArea

      public JTextArea getTextArea()
      Gets the text area.
      Returns:
      the text area
    • getCas

      public CAS 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

      public Properties getPreferences()
      Gets the preferences.
      Returns:
      the preferences
    • getIndexLabel

      public String getIndexLabel()
      Gets the index label.
      Returns:
      the index label
    • getIndex

      public FSIndex getIndex()
      Gets the index.
      Returns:
      the index
    • getStyleMap

      public Map<String,Style> getStyleMap()
      Gets the style map.
      Returns:
      the style map
    • getAe

      public AnalysisEngine getAe()
      Gets the ae.
      Returns:
      the ae
    • setIndexLabel

      public void setIndexLabel(String indexLabel)
      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

      public void setIndex(FSIndex index)
      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

      public File getFileOpenDir()
      Gets the file open dir.
      Returns:
      the file open dir
    • setFileOpenDir

      public void setFileOpenDir(File fileOpenDir)
      Sets the file open dir.
      Parameters:
      fileOpenDir - the new file open dir
    • getTextFile

      public File getTextFile()
      Gets the text file.
      Returns:
      the text file
    • setTextFile

      public void setTextFile(File textFile)
      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

      public UndoMgr 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

      public File getXcasFileOpenDir()
      Gets the xcas file open dir.
      Returns:
      the xcas file open dir
    • setXcasFileOpenDir

      public void setXcasFileOpenDir(File xcasFileOpenDir)
      Sets the xcas file open dir.
      Parameters:
      xcasFileOpenDir - the new xcas file open dir
    • setCas

      public void setCas(CAS cas)
      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

      public File getColorSettingsDir()
      Gets the color settings dir.
      Returns:
      the color settings dir
    • setColorSettingsDir

      public void setColorSettingsDir(File colorSettingsDir)
      Sets the color settings dir.
      Parameters:
      colorSettingsDir - the new color settings dir
    • getColorSettingFile

      public File getColorSettingFile()
      Gets the color setting file.
      Returns:
      the color setting file
    • setColorSettingFile

      public void setColorSettingFile(File colorSettingFile)
      Sets the color setting file.
      Parameters:
      colorSettingFile - the new color setting file
    • getAnnotOpenDir

      public File getAnnotOpenDir()
      Gets the annot open dir.
      Returns:
      the annot open dir
    • setAnnotOpenDir

      public void setAnnotOpenDir(File annotOpenDir)
      Sets the annot open dir.
      Parameters:
      annotOpenDir - the new annot open dir
    • getDataPathName

      public String getDataPathName()
      Gets the data path name.
      Returns:
      the data path name
    • setDataPathName

      public void setDataPathName(String dataPathName)
      Sets the data path name.
      Parameters:
      dataPathName - the new data path name
    • getCodePage

      public String getCodePage()
      Gets the code page.
      Returns:
      the code page
    • setCodePage

      public void setCodePage(String codePage)
      Sets the code page.
      Parameters:
      codePage - the new code page
    • getCodePages

      public List<String> getCodePages()
      Gets the code pages.
      Returns:
      the code pages
    • getLanguage

      public String getLanguage()
      Gets the language.
      Returns:
      the language
    • setLanguage

      public void setLanguage(String language)
      Sets the language.
      Parameters:
      language - the new language
    • getLanguages

      public List<String> getLanguages()
      Gets the languages.
      Returns:
      the languages
    • getLanguagePrefsList

      public String getLanguagePrefsList()
      Gets the language prefs list.
      Returns:
      the language prefs list
    • setLanguagePrefsList

      public void setLanguagePrefsList(String languagePrefsList)
      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. Calling setExitOnClose(false) prevents that. It is then the caller's task to shut down the JVM.
      Parameters:
      exitOnClose - the new exit on close