Package geomss

Interface GeomSSApp


  • public interface GeomSSApp
    The public interface for the GeomSS application that is intended to be accessed from the BeanShell scripting environment.

    Modified by: Joseph A. Huwaldt

    Version:
    September 13, 2015
    Author:
    Joseph A. Huwaldt, Date: May 3, 2009
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addToWindowsMenu​(java.awt.Window window)
      Add the supplied window to the Windows menu of the main application.
      java.util.List<GeomReader> getAllGeomWriters()  
      java.awt.Frame getParentFrame()  
      Preferences getPreferences()  
      java.util.ResourceBundle getResourceBundle()  
      GeomSSScene getScene()  
      void loadWorkspace​(java.io.File theFile)
      Load the specified XGSS file into the current global workspace.
      void posWindowFromPrefs​(java.lang.String prefsKey, java.awt.Window window)
      Positions the input window at the location stored in the preferences using the supplied key (with "PosX" and "PosY" appended).
      void print()
      Print the current 3D view.
      void quit()
      Quit or exit the application after properly saving preferences, etc.
      GeometryList readGeomFile​(java.io.File theFile)
      Read in a geometry file and return a GeometryList instance.
      void saveAsJPEG()
      Save a copy of the current 3D view as a JPEG file.
      void saveAsJPEG​(java.io.File file)
      Save a copy of the current 3D view as a JPEG file.
      void saveAsPNG()
      Save a copy of the current 3D view as a PNG file.
      void saveAsPNG​(java.io.File file)
      Save a copy of the current 3D view as a PNG file.
      void savePrefsWindowPos​(java.lang.String prefsKey, java.awt.Window window)
      Save the location of the specified window in the application preferences using the supplied key (with "PosX" and "PosY" appended).
      void saveWorkspace​(java.io.File theFile)
      Save the entire global workspace to an XGSS file.
      void writeGeomFile​(GeometryList geometry, java.io.File theFile, GeomReader writer)
      Write out geometry to the specified file using the specified GeometryList instance (some GeomReader classes have specific requirements for the contents of this list).
    • Method Detail

      • getParentFrame

        java.awt.Frame getParentFrame()
        Returns:
        the parent Frame for this application.
      • getResourceBundle

        java.util.ResourceBundle getResourceBundle()
        Returns:
        the resource bundle for this application containing the localized application Strings for the main application.
      • addToWindowsMenu

        void addToWindowsMenu​(java.awt.Window window)
        Add the supplied window to the Windows menu of the main application. The window should be made visible before calling this method to avoid an inconsistent user interface state (a window listed in the "Windows" menu, but not visible). The window will be removed from the "Windows" menu when it's "dispose" method is called.
        Parameters:
        window - The window to be added to the Windows menu.
      • quit

        void quit()
        Quit or exit the application after properly saving preferences, etc.
      • readGeomFile

        GeometryList readGeomFile​(java.io.File theFile)
        Read in a geometry file and return a GeometryList instance. All exceptions are handled by this method.
        Parameters:
        theFile - The file to be read in. If null is passed, this method will do nothing.
        Returns:
        A GeometryList object containing the geometry read in from the file or null if the user cancels the read at any point or if an exception of any kind is thrown.
      • writeGeomFile

        void writeGeomFile​(GeometryList geometry,
                           java.io.File theFile,
                           GeomReader writer)
        Write out geometry to the specified file using the specified GeometryList instance (some GeomReader classes have specific requirements for the contents of this list). All exceptions are handled by this method.
        Parameters:
        geometry - The geometry object to be written out.
        theFile - The file to be written to.
        writer - The GeomReader to use to write out the file.
      • getAllGeomWriters

        java.util.List<GeomReadergetAllGeomWriters()
        Returns:
        a list of all known GeomReader objects that are capable of writing to a file.
      • saveWorkspace

        void saveWorkspace​(java.io.File theFile)
        Save the entire global workspace to an XGSS file. All defined geometry and non-geometry variables in the global workspace will be saved to the specified file.
        Parameters:
        theFile - The file to write the workspace to in XGSS format.
      • loadWorkspace

        void loadWorkspace​(java.io.File theFile)
        Load the specified XGSS file into the current global workspace. All the geometry and non-geometry variables in the specified XGSS file will be loaded into the current global workspace. Any existing variables with the same names will be silently overwritten.
        Parameters:
        theFile - The XGSS file to load into the current workspace.
      • saveAsPNG

        void saveAsPNG()
        Save a copy of the current 3D view as a PNG file. The user will be asked to supply a file name for the image file.
      • saveAsPNG

        void saveAsPNG​(java.io.File file)
        Save a copy of the current 3D view as a PNG file.
        Parameters:
        file - The file to be saved.
      • saveAsJPEG

        void saveAsJPEG()
        Save a copy of the current 3D view as a JPEG file. The user will be asked to supply a file name for the image file.
      • saveAsJPEG

        void saveAsJPEG​(java.io.File file)
        Save a copy of the current 3D view as a JPEG file.
        Parameters:
        file - The file to be saved.
      • print

        void print()
        Print the current 3D view. The user will be asked to supply information on the print settings.
      • posWindowFromPrefs

        void posWindowFromPrefs​(java.lang.String prefsKey,
                                java.awt.Window window)
        Positions the input window at the location stored in the preferences using the supplied key (with "PosX" and "PosY" appended). If the preference key isn't found or if the returned values can not be turned into numbers, the setLocationByPlatform() flag is set for the window.
        Parameters:
        prefsKey - The prefix for the preference key to use ("PosX" and "PosY" will be appended in order to retrieve the actual preference values).
        window - The window to be positioned using the preference values.
        See Also:
        Window.setLocationByPlatform(boolean)
      • savePrefsWindowPos

        void savePrefsWindowPos​(java.lang.String prefsKey,
                                java.awt.Window window)
        Save the location of the specified window in the application preferences using the supplied key (with "PosX" and "PosY" appended).
        Parameters:
        prefsKey - The prefix for the preference key to use ("PosX" and "PosY" will be appended in order to save the actual preference values).
        window - The window for which the position is to be saved in the preferences.