# Class GridSliceSelector

Object
Widget
GridSliceSelector

All Implemented Interfaces:
  `Localized`

public class GridSliceSelector extends Widget
A control for selecting a two-dimensional slice in a grid extent having more than 2 dimensions. For example if a n-dimensional data cube contains a time axis, this widget provides a slider for selecting a slice on the time axis.

Since:
  1.3

- ## Property Summary

  Properties
  Type
  Property
  Description
  `final ReadOnlyProperty<GridExtent>`
  `selectedExtent`
  Returns the property for the currently selected grid extent.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final ObjectProperty<GridGeometry>`
  `gridGeometry`
  The grid geometry for which to provide sliders.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GridSliceSelector(Locale locale)`
  Creates a new widget.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final Region`
  `getView()`
  Returns the encapsulated JavaFX component to add in a scene graph for making the selectors visible.
  `final int[]`
  `getXYDimensions()`
  Returns the grid dimensions of x and y axes rendered in a two-dimensional image or table.
  `boolean`
  `isEmpty()`
  Returns `true` if this slice selector has no component to shown.
  `final ReadOnlyProperty<GridExtent>`
  `selectedExtentProperty()`
  Returns the property for the currently selected grid extent.

  ### Methods inherited from class Widget

  `getLocale`

  ### Methods inherited from class Object

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

- ## Property Details

  - ### selectedExtent

    public final ReadOnlyProperty<GridExtent> selectedExtentProperty
    Returns the property for the currently selected grid extent. This value varies after the user finished to drag the slider.
    See Also:
      - `selectedExtentProperty()`

- ## Field Details

  - ### gridGeometry

    public final ObjectProperty<GridGeometry> gridGeometry
    The grid geometry for which to provide sliders.

- ## Constructor Details

  - ### GridSliceSelector

    public GridSliceSelector(Locale locale)
    Creates a new widget.
    Parameters:
      `locale` - the locale to use for axis labels, or `null` for a default locale.

- ## Method Details

  - ### selectedExtentProperty

    public final ReadOnlyProperty<GridExtent> selectedExtentProperty()
    Returns the property for the currently selected grid extent. This value varies after the user finished to drag the slider.
    Returns:
      the currently selected grid extent as a read-only property.

  - ### getXYDimensions

    public final int[] getXYDimensions()
    Returns the grid dimensions of x and y axes rendered in a two-dimensional image or table. This value is inferred from the grid geometry property value. It is almost always {0,1}, i.e. the 2 first dimensions in a coordinate tuple.
    Returns:
      indices of x and y coordinate values in a grid coordinate tuple.

  - ### getView

    public final Region getView()
    Returns the encapsulated JavaFX component to add in a scene graph for making the selectors visible. The `Region` subclass is implementation dependent and may change in any future SIS version.
    Specified by:
      `getView` in class `Widget`
    Returns:
      the JavaFX component to insert in a scene graph.

  - ### isEmpty

    public boolean isEmpty()
    Returns `true` if this slice selector has no component to shown. Slice selectors are always empty with two-dimensional data.
    Returns:
      `true` if this slice selector has no component to shown.