Module org.apache.sis.gui
Package org.apache.sis.gui

# Class DataViewer

Object
Application
DataViewer

public class DataViewer extends Application
Entry point for Apache SIS application. Current implementation shows a `ResourceExplorer` on which user can drop the files to open. The content shown by this `Main` class may change in any future Apache SIS version.

Since:
  1.1

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class Application

  `Application​.Parameters`

- ## Field Summary

  ### Fields inherited from class Application

  `STYLESHEET_CASPIAN, STYLESHEET_MODENA`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DataViewer()`
  Creates a new Apache SIS application.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Stage`
  `getCurrentStage()`
  Returns the window in which the application is running, or `null` if the application is not running.
  `static void`
  `main(String[] args)`
  Starts the Apache SIS application.
  `void`
  `start(Stage window)`
  Invoked by JavaFX for starting the application.
  `void`
  `stop()`
  Invoked when the application should stop.

  ### Methods inherited from class Application

  `getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DataViewer

    public DataViewer()
    Creates a new Apache SIS application.

- ## Method Details

  - ### main

    public static void main(String[] args)
    Starts the Apache SIS application.
    Parameters:
      `args` - ignored.

  - ### start

    public void start(Stage window)
    Invoked by JavaFX for starting the application. This method is called on the JavaFX Application Thread.
    Specified by:
      `start` in class `Application`
    Parameters:
      `window` - the primary stage onto which the application scene will be be set.

  - ### stop

    public void stop() throws Exception
    Invoked when the application should stop. No SIS application can be used after this method has been invoked (i.e. the application cannot be restarted).
    Overrides:
      `stop` in class `Application`
    Throws:
      `Exception` - if an error occurred, for example while closing a data store.

  - ### getCurrentStage

    public static Stage getCurrentStage()
    Returns the window in which the application is running, or `null` if the application is not running.
    Returns:
      the window in which the application is running, or `null`.