Package org.apache.sis.gui.coverage
Class GridView
Object
Node
Parent
Region
Control
GridView
- All Implemented Interfaces:
- Styleable,- EventTarget,- Skinnable
@DefaultProperty("image")
public class GridView
extends Control
A view of numerical values in a 
RenderedImage. The rendered image is typically a two dimensional slice
 of a GridCoverage. The number of rows is the image height and the number of columns is the image width.
 The view shows one band at a time, but the band to show can be changed (thus providing a navigation in a third
 dimension).
 This class is designed for large images, with tiles loaded in a background thread only when first needed.
 This is not a general purpose grid viewer; for matrices of relatively small size (e.g. less than 100 columns),
 consider using the standard JavaFX TableView instead.
- Since:
- 1.1
- See Also:
Defined in the sis-javafx module
- 
Property SummaryProperties inherited from class ControlcontextMenu, skin, tooltipProperties inherited from class Regionbackground, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties inherited from class ParentneedsLayoutProperties inherited from class NodeaccessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
- 
Field SummaryFieldsModifier and TypeFieldDescriptionfinal IntegerPropertyThe image band to show in the table.final DoublePropertyHeight of all rows in the grid.final DoublePropertyHorizontal space between cells, as a number equals or greater than zero.final DoublePropertyWidth of data cell to be shown in other columns than the header column.final ObjectProperty<Paint>The background color of row and column headers.final DoublePropertyWidth of header cells to be shown in the first column.final ObjectProperty<RenderedImage>The data shown in this table.Fields inherited from class RegionUSE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class NodeBASELINE_OFFSET_SAME_AS_HEIGHT
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal Optional<StringProperty>The property for the pattern of values in cells.protected final Skin<GridView>Creates a new instance of the skin responsible for rendering this grid view.final intgetBand()Returns the index of the band shown in this grid view.final RenderedImageReturns the source of sample values for this table.final voidsetBand(int index) Sets the number of the band to show in this grid view.final voidsetImage(RenderedImage image) Sets the image to show in this table.voidsetImage(ImageRequest source) Loads image in a background thread from the given source.Methods inherited from class ControlcomputeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipPropertyMethods inherited from class RegionbackgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthPropertyMethods inherited from class ParentgetChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods inherited from class NodeaccessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visiblePropertyMethods inherited from class Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface StyleablegetStyleableNode
- 
Field Details- 
imagePropertyThe data shown in this table. Note that setting this property to a non-null value may not modify the grid content immediately. Instead, a background process will request the tiles.
- 
bandPropertypublic final IntegerProperty bandPropertyThe image band to show in the table. It should be a number between 0 inclusive andSampleModel.getNumBands()exclusive.- See Also:
 
- 
headerWidthpublic final DoubleProperty headerWidthWidth of header cells to be shown in the first column. The first (header) column contains the row indices, or sometimes the coordinate values. This size includes the cell spacing. It shall be a number strictly greater than zero.API note: We do not provide getter/setter for this property; useWritableDoubleValue.set(double)directly instead. We omit the "Property" suffix for making this operation more natural.
- 
cellWidthpublic final DoubleProperty cellWidthWidth of data cell to be shown in other columns than the header column. This size includes the cell spacing. It shall be a number strictly greater than zero.API note: We do not provide getter/setter for this property; useWritableDoubleValue.set(double)directly instead. We omit the "Property" suffix for making this operation more natural.
- 
cellHeightpublic final DoubleProperty cellHeightHeight of all rows in the grid. It shall be a number strictly greater than zero.API note: We do not provide getter/setter for this property; useWritableDoubleValue.set(double)directly instead. We omit the "Property" suffix for making this operation more natural.
- 
cellSpacingpublic final DoubleProperty cellSpacingHorizontal space between cells, as a number equals or greater than zero. There is no property for vertical cell spacing because increasing the cell height should be sufficient.API note: We do not provide getter/setter for this property; useWritableDoubleValue.set(double)directly instead. We omit the "Property" suffix for making this operation more natural.
- 
headerBackgroundpublic final ObjectProperty<Paint> headerBackgroundThe background color of row and column headers.API note: We do not provide getter/setter for this property; useWritableObjectValue.set(Object)directly instead. We omit the "Property" suffix for making this operation more natural.
 
- 
- 
Constructor Details- 
GridViewpublic GridView()Creates an initially empty grid view. The content can be set after construction by a call tosetImage(RenderedImage).
 
- 
- 
Method Details- 
getImageReturns the source of sample values for this table. This method, like all other methods in this class, shall be invoked from the JavaFX thread.- Returns:
- the image shown in this table, or nullif none.
- See Also:
 
- 
setImageSets the image to show in this table. This method shall be invoked from JavaFX thread and returns quickly; it does not attempt to fetch any tile. Calls toRenderedImage.getTile(int, int)will be done in a background thread when first needed.- Parameters:
- image- the image to show in this table, or- nullif none.
- See Also:
 
- 
setImageLoads image 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- nullif none.
- See Also:
 
- 
getBandpublic final int getBand()Returns the index of the band shown in this grid view.- Returns:
- index of the currently visible band number.
- See Also:
 
- 
setBandpublic final void setBand(int index) Sets the number of the band to show in this grid view. This value should be from 0 (inclusive) to the number of bands in the image (exclusive).- Parameters:
- index- the band to make visible.
- Throws:
- IllegalArgumentException- if the given band index is out of bounds.
 
- 
cellFormatPatternThe property for the pattern of values in cells. Note that this pattern depends on current locale. It is provided for user interactions (i.e. in a GUI control) instead of programmatic action.- Returns:
- the localized format pattern property, or an empty value if the NumberFormatused for writing cell values is not an instance ofDecimalFormat.
- See Also:
 
- 
createDefaultSkinCreates a new instance of the skin responsible for rendering this grid view. From the perspective of thisControl, theSkinis a black box. It listens and responds to changes in state of this grid view. This method is called if no skin is provided via CSS orControl.setSkin(Skin).- Overrides:
- createDefaultSkinin class- Control
- Returns:
- the renderer of this grid view.
 
 
-