Class AnnotationViewerMain

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

public class AnnotationViewerMain extends JFrame
Main Annotation Viewer GUI. Allows user to choose directory of XCAS or XMI files, then launches the AnnotationViewerDialog.
See Also:
  • Constructor Details

    • AnnotationViewerMain

      public AnnotationViewerMain()
      Constructor. Sets up the GUI.
  • Method Details

    • viewDocuments

      public void viewDocuments() throws InvalidXMLException, IOException, ResourceInitializationException
      View documents.
      Throws:
      InvalidXMLException - the invalid XML exception
      IOException - Signals that an I/O exception has occurred.
      ResourceInitializationException - the resource initialization exception
    • getStyleMapFileName

      public File getStyleMapFileName(String aDescriptorFileName)
      Gets the name of the style map file for the given AE or TypeSystem descriptor filename.
      Parameters:
      aDescriptorFileName - the a descriptor file name
      Returns:
      the style map file name
    • main

      public static void main(String[] args)
      The main method.
      Parameters:
      args - the arguments
    • savePreferences

      public void savePreferences()
      Save user's preferences using Java's Preference API.
    • restorePreferences

      public void restorePreferences()
      Reset GUI to preferences last saved via savePreferences().
    • displayError

      public void displayError(String aErrorString)
      Displays an error message to the user.
      Parameters:
      aErrorString - error message to display
    • displayError

      public void displayError(Throwable aThrowable)
      Displays an error message to the user.
      Parameters:
      aThrowable - Throwable whose message is to be displayed.
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class Container