Package org.apache.sis.gui.dataset
Class ResourceExplorer
- All Implemented Interfaces:
- Localized
A panel showing a tree of resources together with their metadata and data views.
 This panel also contains a "new window" button for creating new windows showing the same data but potentially
 a different locations and times. 
ResourceExplorer contains a list of windows created by this widget.- Since:
- 1.1
Defined in the sis-javafx module
- 
Property SummaryPropertiesTypePropertyDescriptionfinal ReadOnlyProperty<Resource>Returns the property for currently selected resource.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal LocaleReturns the locale for controls and messages.EventHandler<ResourceEvent>Returns the function to be called when a resource is closed.EventHandler<ResourceEvent>Returns the function to be called after a resource has been loaded from a file or URL.final ResourceReturns the currently selected resource.final RegiongetView()Returns the region containing the resource tree, metadata panel and any other control managed by thisResourceExplorer.voidloadResources(Collection<?> files) Loads all given sources in background threads and add them to the resource tree.voidremoveAndClose(Resource resource) Removes the given resource from the tree and eventually closes it.final ReadOnlyProperty<Resource>Returns the property for currently selected resource.voidsetOnResourceClosed(EventHandler<ResourceEvent> handler) Specifies a function to be called when a resource is closed.voidsetOnResourceLoaded(EventHandler<ResourceEvent> handler) Specifies a function to be called after a resource has been loaded from a file or URL.
- 
Property Details- 
selectedResourceReturns the property for currently selected resource.- See Also:
 
 
- 
- 
Constructor Details- 
ResourceExplorerpublic ResourceExplorer()Creates a new panel for exploring resources.
 
- 
- 
Method Details- 
getLocaleReturns the locale for controls and messages.- Specified by:
- getLocalein interface- Localized
- Overrides:
- getLocalein class- Widget
- Returns:
- the locale for controls in this widget.
 
- 
getViewpublic final Region getView()Returns the region containing the resource tree, metadata panel and any other control managed by thisResourceExplorer. The subclass is implementation dependent and may change in any future version.
- 
getOnResourceLoadedReturns the function to be called after a resource has been loaded from a file or URL. This is an accessor for theResourceTree.onResourceLoadedproperty value.- Returns:
- current function to be called after a resource has been loaded, or nullif none.
- See Also:
 
- 
setOnResourceLoadedSpecifies a function to be called after a resource has been loaded from a file or URL. This is a setter for theResourceTree.onResourceLoadedproperty value. If this method is never invoked, then the default value isnull.- Parameters:
- handler- new function to be called after a resource has been loaded, or- nullif none.
- See Also:
 
- 
getOnResourceClosedReturns the function to be called when a resource is closed. This is an accessor for theResourceTree.onResourceClosedproperty value.- Returns:
- current function to be called when a resource is closed, or nullif none.
- Since:
- 1.2
- See Also:
 
- 
setOnResourceClosedSpecifies a function to be called when a resource is closed. This is a setter for theResourceTree.onResourceClosedproperty value. If this method is never invoked, then the default value isnull.- Parameters:
- handler- new function to be called when a resource is closed, or- nullif none.
- Since:
- 1.2
- See Also:
 
- 
loadResourcesLoads all given sources in background threads and add them to the resource tree. The given collection typically contains files to load, but may also containResourceinstances to add directly. This method forwards the files toResourceTree.loadResource(Object), which will allocate a background thread for each resource to load.
- 
removeAndCloseRemoves the given resource from the tree and eventually closes it. If the given resource is not in this tree explorer or cannot be removed, then this method does nothing.- Parameters:
- resource- the resource to remove, or- null.
- See Also:
 
- 
getSelectedResourceReturns the currently selected resource.- Returns:
- the currently selected resource, or nullif none.
 
- 
selectedResourcePropertyReturns the property for currently selected resource.- Returns:
- property for currently selected resource.
 
 
-