Class CoverageExplorer

Object
Widget
CoverageExplorer
All Implemented Interfaces:
Localized

@DefaultProperty("coverage") public class CoverageExplorer extends Widget
An image or tabular view of Grid­Coverage together with controls for band selection and other operations. The class contains two properties: Controls are provided for allowing user to customize map projection, number formats, etc.. The set of control depends on the view type.

Limitations

Current implementation is restricted to Grid­Coverage instances, but a future implementation may generalize to org​.opengis​.coverage​.Coverage instances.
Since:
1.1
See Also:

Defined in the sis-javafx module

  • Field Details

    • viewTypeProperty

      public final ObjectProperty<CoverageExplorer.View> viewTypeProperty
      The type of view (image or tabular data) shown in this explorer.
      See Also:
    • resourceProperty

      public final ObjectProperty<GridCoverageResource> resourceProperty
      The source of coverage data shown in this explorer. If this property value is non-null, then coverage­Property value will change at any time (potentially many times) depending on the zoom level or other user interaction. Conversely if a value is set explicitly on coverage­Property, then this resource­Property is cleared.

      Relationship with view properties

      This property is "weakly bound" to Coverage­Canvas​.resource­Property: the two properties generally have the same value but are not necessarily updated in same time. After a value is set on one property, the other property may be updated only after some background process (e.g. loading) finished. If a view is not the currently visible view, its property may be updated only when the view become visible.
      Since:
      1.2
      See Also:
    • coverageProperty

      public final ObjectProperty<GridCoverage> coverageProperty
      The data shown in this canvas. This property value may be set implicitly or explicitly:
      • If the resource­Property value is non-null, then the value will change automatically at any time (potentially many times) depending on user interaction.
      • Conversely if an explicit value is set on this property, then the resource­Property is cleared.
      Note that a change in this property value may not modify the canvas content immediately. Instead, a background process will request the tiles and update the canvas content later, when data are ready.

      Current implementation is restricted to Grid­Coverage instances, but a future implementation may generalize to org​.opengis​.coverage​.Coverage instances.

      Relationship with view properties

      This property is "weakly bound" to Coverage­Canvas​.coverage­Property: the two properties generally have the same value but are not necessarily updated in same time. After a value is set on one property, the other property may be updated only after some background process (e.g. loading) finished. If a view is not the currently visible view, its property may be updated only when the view become visible.
      See Also:
  • Constructor Details

    • CoverageExplorer

      public CoverageExplorer()
      Creates an initially empty explorer with default view type. By default Coverage­Explorer will show a coverage as a table of values, i.e. the default view type is Coverage­Explorer​.View​.TABLE.
      API note: the reason for setting default value to tabular data is because it requires loading much less data with Rendered­Images supporting deferred tile loading. By contrast Coverage­Explorer​.View​.IMAGE may require loading the full image.
    • CoverageExplorer

      public CoverageExplorer(CoverageExplorer.View type)
      Creates an initially empty explorer with the specified view type.
      Parameters:
      type - the way to show coverages in this explorer.
      Since:
      1.2
      See Also:
    • CoverageExplorer

      public CoverageExplorer(CoverageExplorer source)
      Creates an explorer initialized with the same coverage or resource than the given explorer.
      Parameters:
      source - the source explorer from which to take the initial coverage or resource.
      Since:
      1.2
  • Method Details

    • getCanvas

      public final CoverageCanvas getCanvas()
      Returns the canvas where the image is shown.
      Returns:
      the canvas where the image is shown.
      Since:
      1.2
    • getView

      public final Region getView()
      Returns the region containing the grid or coverage view, band selector and any control managed by this Coverage­Explorer. The Region subclass returned by this method is implementation dependent and may change in any future version.
      Specified by:
      get­View in class Widget
      Returns:
      the region to show.
      See Also:
    • getDataView

      public final Region getDataView(CoverageExplorer.View type)
      Returns the region containing only the data visualization component, without controls. This is a Grid­View or Coverage­Canvas together with their Status­Bar. The Region subclass returned by this method is implementation dependent and may change in any future version.
      Parameters:
      type - whether to obtain a Grid­View or Coverage­Canvas.
      Returns:
      the requested view for the value of resource­Property or coverage­Property.
    • getControls

      public final TitledPane[] getControls(CoverageExplorer.View type)
      Returns the panes containing the controls, without data visualization component. The Titled­Pane contents are implementation dependent and may change in any future version.
      Parameters:
      type - whether to obtain controls for Grid­View or Coverage­Canvas.
      Returns:
      the controls on specified data view.
    • getViewType

      public final CoverageExplorer.View getViewType()
      Returns the type of view (image or tabular data) shown in this explorer. The default value is Coverage­Explorer​.View​.TABLE.
      Returns:
      the way to show coverages in this explorer.
      See Also:
    • setViewType

      public final void setViewType(CoverageExplorer.View type)
      Sets the type of view to show in this explorer.
      Parameters:
      type - the new way to show coverages in this explorer.
      See Also:
    • getResource

      public final GridCoverageResource getResource()
      Returns the source of coverages for this explorer. This method, like all other methods in this class, shall be invoked from the JavaFX thread.
      Returns:
      the source of coverages shown in this explorer, or null if none.
      Since:
      1.2
      See Also:
    • setResource

      public final void setResource(GridCoverageResource resource)
      Sets the source of coverages shown in this explorer. This method shall be invoked from JavaFX thread and returns immediately. The new data are loaded in a background thread and the coverage­Property value will be updated after an undetermined amount of time.
      Parameters:
      resource - the source of data to show in this explorer, or null if none.
      Since:
      1.2
      See Also:
    • getCoverage

      public final GridCoverage getCoverage()
      Returns the source of sample values for this explorer. This method, like all other methods in this class, shall be invoked from the JavaFX thread. Note that this value may change at any time (depending on user interaction) if the resource­Property has a non-null value.
      Returns:
      the coverage shown in this explorer, or null if none.
      See Also:
    • setCoverage

      public final void setCoverage(GridCoverage coverage)
      Sets the coverage to show in this explorer. This method shall be invoked from JavaFX thread and returns immediately. The new data are loaded in a background thread and will appear after an undetermined amount of time.

      Invoking this method sets the resource­Property value to null.

      Parameters:
      coverage - the data to show in this explorer, or null if none.
      See Also:
    • setCoverage

      public final void setCoverage(ImageRequest source)
      Loads coverage in a background thread from the given source. This method shall be invoked from JavaFX thread and returns immediately. The grid content may appear unmodified after this method returns; the modifications will appear after an undetermined amount of time.
      Parameters:
      source - the coverage or resource to load, or null if none.
      See Also: