blob: 5b988fe674b21c7a797723cc7dc997af18b40565 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (19) -->
<title>ResourceTree (Apache SIS 1.3 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.sis.gui.dataset, class: ResourceTree">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.gui.dataset.ResourceTree class">
<meta name="keywords" content="onResourceLoaded">
<meta name="keywords" content="onResourceClosed">
<meta name="keywords" content="getResource()">
<meta name="keywords" content="setResource()">
<meta name="keywords" content="addResource()">
<meta name="keywords" content="loadResource()">
<meta name="keywords" content="removeAndClose()">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../sis.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/ResourceTree.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li><a href="#nested-class-summary">Nested</a></li>
<li><a href="#field-summary">Field</a></li>
<li><a href="#constructor-summary">Constr</a></li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li><a href="#field-detail">Field</a></li>
<li><a href="#constructor-detail">Constr</a></li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li><a href="#nested-class-summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><a href="../../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.gui.dataset</a></div>
<h1 title="Class ResourceTree" class="title">Class ResourceTree</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
<div class="inheritance">Node
<div class="inheritance">Parent
<div class="inheritance">Region
<div class="inheritance">Control
<div class="inheritance">TreeView&lt;<a href="../../storage/Resource.html" title="interface in org.apache.sis.storage">Resource</a>&gt;
<div class="inheritance">ResourceTree</div>
</div>
</div>
</div>
</div>
</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code>Styleable</code>, <code>Event­Target</code>, <code>Skinnable</code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">ResourceTree</span>
<span class="extends-implements">extends TreeView&lt;<a href="../../storage/Resource.html" title="interface in org.apache.sis.storage">Resource</a>&gt;</span></div>
<div class="block">A view of data <a href="../../storage/Resource.html" title="interface in org.apache.sis.storage"><code>Resource</code></a>s organized as a tree.
This view can be used for showing the content of one or many <a href="../../storage/DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a>s.
A resource can be added by a call to <a href="#addResource(org.apache.sis.storage.Resource)"><code>add­Resource(Resource)</code></a> or loaded from
a file by <a href="#loadResource(java.lang.Object)"><code>load­Resource(Object)</code></a>.
<p><code>Resource­Tree</code> registers the necessarily handlers for making this view a target
of "drag and drop" events. Users can drop files or URLs for opening data files.</p>
<h2>Limitations</h2>
<ul>
<li>The <code>root­Property</code> should be considered read-only.
For changing content, use the <a href="#setResource(org.apache.sis.storage.Resource)"><code>set­Resource(Resource)</code></a> instead.</li>
<li>If the user selects "close" in the contextual menu, the resource is unconditionally closed
(if it is an instance of <a href="../../storage/DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a>). There is not yet a mechanism for keeping it open
if the resource is shared by another <a href="ResourceTree.html" title="class in org.apache.sis.gui.dataset"><code>Resource­Tree</code></a> instance.</li>
</ul></div>
<dl class="notes">
<dt>Since:</dt>
<dd>1.1</dd>
<p><font size="-1">Defined in the <code>sis-javafx</code> module</font></p>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== PROPERTY SUMMARY =========== -->
<li>
<section class="property-summary" id="property-summary">
<h2>Property Summary</h2>
<div class="inherited-list">
<h3 id="properties-inherited-from-class-TreeView">Properties inherited from class&nbsp;TreeView</h3>
<code>cell­Factory, editable, editing­Item, expanded­Item­Count, fixed­Cell­Size, focus­Model, on­Edit­Cancel, on­Edit­Commit, on­Edit­Start, on­Scroll­To, root, selection­Model, show­Root</code></div>
<div class="inherited-list">
<h3 id="properties-inherited-from-class-Control">Properties inherited from class&nbsp;Control</h3>
<code>context­Menu, skin, tooltip</code></div>
<div class="inherited-list">
<h3 id="properties-inherited-from-class-Region">Properties inherited from class&nbsp;Region</h3>
<code>background, border, cache­Shape, center­Shape, height, insets, max­Height, max­Width, min­Height, min­Width, opaque­Insets, padding, pref­Height, pref­Width, scale­Shape, shape, snap­To­Pixel, width</code></div>
<div class="inherited-list">
<h3 id="properties-inherited-from-class-Parent">Properties inherited from class&nbsp;Parent</h3>
<code>needs­Layout</code></div>
<div class="inherited-list">
<h3 id="properties-inherited-from-class-Node">Properties inherited from class&nbsp;Node</h3>
<code>accessible­Help, accessible­Role­Description, accessible­Role, accessible­Text, blend­Mode, bounds­In­Local, bounds­In­Parent, cache­Hint, cache, clip, cursor, depth­Test, disabled, disable, effective­Node­Orientation, effect, event­Dispatcher, focused, focus­Traversable, focus­Visible, focus­Within, hover, id, input­Method­Requests, layout­Bounds, layout­X, layout­Y, local­To­Parent­Transform, local­To­Scene­Transform, managed, mouse­Transparent, node­Orientation, on­Context­Menu­Requested, on­Drag­Detected, on­Drag­Done, on­Drag­Dropped, on­Drag­Entered, on­Drag­Exited, on­Drag­Over, on­Input­Method­Text­Changed, on­Key­Pressed, on­Key­Released, on­Key­Typed, on­Mouse­Clicked, on­Mouse­Drag­Entered, on­Mouse­Drag­Exited, on­Mouse­Dragged, on­Mouse­Drag­Over, on­Mouse­Drag­Released, on­Mouse­Entered, on­Mouse­Exited, on­Mouse­Moved, on­Mouse­Pressed, on­Mouse­Released, on­Rotate, on­Rotation­Finished, on­Rotation­Started, on­Scroll­Finished, on­Scroll, on­Scroll­Started, on­Swipe­Down, on­Swipe­Left, on­Swipe­Right, on­Swipe­Up, on­Touch­Moved, on­Touch­Pressed, on­Touch­Released, on­Touch­Stationary, on­Zoom­Finished, on­Zoom, on­Zoom­Started, opacity, parent, pick­On­Bounds, pressed, rotate, rotation­Axis, scale­X, scale­Y, scale­Z, scene, style, translate­X, translate­Y, translate­Z, view­Order, visible</code></div>
</section>
</li>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<li>
<section class="nested-class-summary" id="nested-class-summary">
<h2>Nested Class Summary</h2>
<div class="inherited-list">
<h2 id="nested-classes-inherited-from-class-javafx.scene.control.TreeView">Nested classes/interfaces inherited from class&nbsp;TreeView</h2>
<code>Tree­View​.Edit­Event&lt;T&gt;</code></div>
</section>
</li>
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>final Object­Property&lt;Event­Handler&lt;<a href="ResourceEvent.html" title="class in org.apache.sis.gui.dataset">Resource­Event</a>&gt;&gt;</code></div>
<div class="col-second even-row-color"><code><a href="#onResourceClosed" class="member-name-link">on­Resource­Closed</a></code></div>
<div class="col-last even-row-color">
<div class="block">Function to be called after a resource has been closed from a file or URL.</div>
</div>
<div class="col-first odd-row-color"><code>final Object­Property&lt;Event­Handler&lt;<a href="ResourceEvent.html" title="class in org.apache.sis.gui.dataset">Resource­Event</a>&gt;&gt;</code></div>
<div class="col-second odd-row-color"><code><a href="#onResourceLoaded" class="member-name-link">on­Resource­Loaded</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Function to be called after a resource has been loaded from a file or URL.</div>
</div>
</div>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-Region">Fields inherited from class&nbsp;Region</h3>
<code>USE_COMPUTED_SIZE, USE_PREF_SIZE</code></div>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-Node">Fields inherited from class&nbsp;Node</h3>
<code>BASELINE_OFFSET_SAME_AS_HEIGHT</code></div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">Resource­Tree</a>()</code></div>
<div class="col-last even-row-color">
<div class="block">Creates a new tree of resources with initially no resource to show.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addResource(org.apache.sis.storage.Resource)" class="member-name-link">add­Resource</a><wbr>(<a href="../../storage/Resource.html" title="interface in org.apache.sis.storage">Resource</a>&nbsp;resource)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds a resource in this tree below previously added resources.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../../storage/Resource.html" title="interface in org.apache.sis.storage">Resource</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getResource()" class="member-name-link">get­Resource</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the root <a href="../../storage/Resource.html" title="interface in org.apache.sis.storage"><code>Resource</code></a> of this tree.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#loadResource(java.lang.Object)" class="member-name-link">load­Resource</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;source)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Loads in a background thread the resources from the given source,
then <a href="#addResource(org.apache.sis.storage.Resource)">adds the resource</a> to this tree.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#removeAndClose(org.apache.sis.storage.Resource)" class="member-name-link">remove­And­Close</a><wbr>(<a href="../../storage/Resource.html" title="interface in org.apache.sis.storage">Resource</a>&nbsp;resource)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Removes the given resource from this tree and closes the resource if it is a <a href="../../storage/DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a> instance.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setResource(org.apache.sis.storage.Resource)" class="member-name-link">set­Resource</a><wbr>(<a href="../../storage/Resource.html" title="interface in org.apache.sis.storage">Resource</a>&nbsp;resource)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the root <a href="../../storage/Resource.html" title="interface in org.apache.sis.storage"><code>Resource</code></a> of this tree.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-TreeView">Methods inherited from class&nbsp;TreeView</h3>
<code>cell­Factory­Property, create­Default­Skin, edit, editable­Property, edit­Any­Event, edit­Cancel­Event, edit­Commit­Event, editing­Item­Property, edit­Start­Event, expanded­Item­Count­Property, fixed­Cell­Size­Property, focus­Model­Property, get­Cell­Factory, get­Class­Css­Meta­Data, get­Control­Css­Meta­Data, get­Editing­Item, get­Expanded­Item­Count, get­Fixed­Cell­Size, get­Focus­Model, get­Node­Level, get­On­Edit­Cancel, get­On­Edit­Commit, get­On­Edit­Start, get­On­Scroll­To, get­Root, get­Row, get­Selection­Model, get­Tree­Item, get­Tree­Item­Level, is­Editable, is­Show­Root, layout­Children, on­Edit­Cancel­Property, on­Edit­Commit­Property, on­Edit­Start­Property, on­Scroll­To­Property, query­Accessible­Attribute, refresh, root­Property, scroll­To, selection­Model­Property, set­Cell­Factory, set­Editable, set­Fixed­Cell­Size, set­Focus­Model, set­On­Edit­Cancel, set­On­Edit­Commit, set­On­Edit­Start, set­On­Scroll­To, set­Root, set­Selection­Model, set­Show­Root, show­Root­Property</code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Control">Methods inherited from class&nbsp;Control</h3>
<code>compute­Max­Height, compute­Max­Width, compute­Min­Height, compute­Min­Width, compute­Pref­Height, compute­Pref­Width, context­Menu­Property, execute­Accessible­Action, get­Baseline­Offset, get­Context­Menu, get­Css­Meta­Data, get­Initial­Focus­Traversable, get­Skin, get­Tooltip, is­Resizable, set­Context­Menu, set­Skin, set­Tooltip, skin­Property, tooltip­Property</code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Region">Methods inherited from class&nbsp;Region</h3>
<code>background­Property, border­Property, cache­Shape­Property, center­Shape­Property, get­Background, get­Border, get­Height, get­Insets, get­Max­Height, get­Max­Width, get­Min­Height, get­Min­Width, get­Opaque­Insets, get­Padding, get­Pref­Height, get­Pref­Width, get­Shape, get­User­Agent­Stylesheet, get­Width, height­Property, insets­Property, is­Cache­Shape, is­Center­Shape, is­Scale­Shape, is­Snap­To­Pixel, layout­In­Area, layout­In­Area, layout­In­Area, layout­In­Area, max­Height, max­Height­Property, max­Width, max­Width­Property, min­Height, min­Height­Property, min­Width, min­Width­Property, opaque­Insets­Property, padding­Property, position­In­Area, position­In­Area, pref­Height, pref­Height­Property, pref­Width, pref­Width­Property, resize, scale­Shape­Property, set­Background, set­Border, set­Cache­Shape, set­Center­Shape, set­Height, set­Max­Height, set­Max­Size, set­Max­Width, set­Min­Height, set­Min­Size, set­Min­Width, set­Opaque­Insets, set­Padding, set­Pref­Height, set­Pref­Size, set­Pref­Width, set­Scale­Shape, set­Shape, set­Snap­To­Pixel, set­Width, shape­Property, snapped­Bottom­Inset, snapped­Left­Inset, snapped­Right­Inset, snapped­Top­Inset, snap­Position, snap­Position­X, snap­Position­Y, snap­Size, snap­Size­X, snap­Size­Y, snap­Space, snap­Space­X, snap­Space­Y, snap­To­Pixel­Property, width­Property</code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Parent">Methods inherited from class&nbsp;Parent</h3>
<code>get­Children, get­Children­Unmodifiable, get­Managed­Children, get­Stylesheets, is­Needs­Layout, layout, lookup, needs­Layout­Property, request­Layout, request­Parent­Layout, set­Needs­Layout, update­Bounds</code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Node">Methods inherited from class&nbsp;Node</h3>
<code>accessible­Help­Property, accessible­Role­Description­Property, accessible­Role­Property, accessible­Text­Property, add­Event­Filter, add­Event­Handler, apply­Css, autosize, blend­Mode­Property, bounds­In­Local­Property, bounds­In­Parent­Property, build­Event­Dispatch­Chain, cache­Hint­Property, cache­Property, clip­Property, compute­Area­In­Screen, contains, contains, cursor­Property, depth­Test­Property, disabled­Property, disable­Property, effective­Node­Orientation­Property, effect­Property, event­Dispatcher­Property, fire­Event, focused­Property, focus­Traversable­Property, focus­Visible­Property, focus­Within­Property, get­Accessible­Help, get­Accessible­Role, get­Accessible­Role­Description, get­Accessible­Text, get­Blend­Mode, get­Bounds­In­Local, get­Bounds­In­Parent, get­Cache­Hint, get­Clip, get­Content­Bias, get­Cursor, get­Depth­Test, get­Effect, get­Effective­Node­Orientation, get­Event­Dispatcher, get­Id, get­Initial­Cursor, get­Input­Method­Requests, get­Layout­Bounds, get­Layout­X, get­Layout­Y, get­Local­To­Parent­Transform, get­Local­To­Scene­Transform, get­Node­Orientation, get­On­Context­Menu­Requested, get­On­Drag­Detected, get­On­Drag­Done, get­On­Drag­Dropped, get­On­Drag­Entered, get­On­Drag­Exited, get­On­Drag­Over, get­On­Input­Method­Text­Changed, get­On­Key­Pressed, get­On­Key­Released, get­On­Key­Typed, get­On­Mouse­Clicked, get­On­Mouse­Drag­Entered, get­On­Mouse­Drag­Exited, get­On­Mouse­Dragged, get­On­Mouse­Drag­Over, get­On­Mouse­Drag­Released, get­On­Mouse­Entered, get­On­Mouse­Exited, get­On­Mouse­Moved, get­On­Mouse­Pressed, get­On­Mouse­Released, get­On­Rotate, get­On­Rotation­Finished, get­On­Rotation­Started, get­On­Scroll, get­On­Scroll­Finished, get­On­Scroll­Started, get­On­Swipe­Down, get­On­Swipe­Left, get­On­Swipe­Right, get­On­Swipe­Up, get­On­Touch­Moved, get­On­Touch­Pressed, get­On­Touch­Released, get­On­Touch­Stationary, get­On­Zoom, get­On­Zoom­Finished, get­On­Zoom­Started, get­Opacity, get­Parent, get­Properties, get­Pseudo­Class­States, get­Rotate, get­Rotation­Axis, get­Scale­X, get­Scale­Y, get­Scale­Z, get­Scene, get­Style, get­Styleable­Parent, get­Style­Class, get­Transforms, get­Translate­X, get­Translate­Y, get­Translate­Z, get­Type­Selector, get­User­Data, get­View­Order, has­Properties, hover­Property, id­Property, input­Method­Requests­Property, intersects, intersects, is­Cache, is­Disable, is­Disabled, is­Focused, is­Focus­Traversable, is­Focus­Visible, is­Focus­Within, is­Hover, is­Managed, is­Mouse­Transparent, is­Pick­On­Bounds, is­Pressed, is­Visible, layout­Bounds­Property, layout­XProperty, layout­YProperty, local­To­Parent, local­To­Parent, local­To­Parent, local­To­Parent, local­To­Parent, local­To­Parent­Transform­Property, local­To­Scene, local­To­Scene, local­To­Scene, local­To­Scene, local­To­Scene, local­To­Scene, local­To­Scene, local­To­Scene, local­To­Scene, local­To­Scene, local­To­Scene­Transform­Property, local­To­Screen, local­To­Screen, local­To­Screen, local­To­Screen, local­To­Screen, lookup­All, managed­Property, mouse­Transparent­Property, node­Orientation­Property, notify­Accessible­Attribute­Changed, on­Context­Menu­Requested­Property, on­Drag­Detected­Property, on­Drag­Done­Property, on­Drag­Dropped­Property, on­Drag­Entered­Property, on­Drag­Exited­Property, on­Drag­Over­Property, on­Input­Method­Text­Changed­Property, on­Key­Pressed­Property, on­Key­Released­Property, on­Key­Typed­Property, on­Mouse­Clicked­Property, on­Mouse­Drag­Entered­Property, on­Mouse­Drag­Exited­Property, on­Mouse­Dragged­Property, on­Mouse­Drag­Over­Property, on­Mouse­Drag­Released­Property, on­Mouse­Entered­Property, on­Mouse­Exited­Property, on­Mouse­Moved­Property, on­Mouse­Pressed­Property, on­Mouse­Released­Property, on­Rotate­Property, on­Rotation­Finished­Property, on­Rotation­Started­Property, on­Scroll­Finished­Property, on­Scroll­Property, on­Scroll­Started­Property, on­Swipe­Down­Property, on­Swipe­Left­Property, on­Swipe­Right­Property, on­Swipe­Up­Property, on­Touch­Moved­Property, on­Touch­Pressed­Property, on­Touch­Released­Property, on­Touch­Stationary­Property, on­Zoom­Finished­Property, on­Zoom­Property, on­Zoom­Started­Property, opacity­Property, parent­Property, parent­To­Local, parent­To­Local, parent­To­Local, parent­To­Local, parent­To­Local, pick­On­Bounds­Property, pressed­Property, pseudo­Class­State­Changed, relocate, remove­Event­Filter, remove­Event­Handler, request­Focus, resize­Relocate, rotate­Property, rotation­Axis­Property, scale­XProperty, scale­YProperty, scale­ZProperty, scene­Property, scene­To­Local, scene­To­Local, scene­To­Local, scene­To­Local, scene­To­Local, scene­To­Local, scene­To­Local, scene­To­Local, screen­To­Local, screen­To­Local, screen­To­Local, set­Accessible­Help, set­Accessible­Role, set­Accessible­Role­Description, set­Accessible­Text, set­Blend­Mode, set­Cache, set­Cache­Hint, set­Clip, set­Cursor, set­Depth­Test, set­Disable, set­Disabled, set­Effect, set­Event­Dispatcher, set­Event­Handler, set­Focused, set­Focus­Traversable, set­Hover, set­Id, set­Input­Method­Requests, set­Layout­X, set­Layout­Y, set­Managed, set­Mouse­Transparent, set­Node­Orientation, set­On­Context­Menu­Requested, set­On­Drag­Detected, set­On­Drag­Done, set­On­Drag­Dropped, set­On­Drag­Entered, set­On­Drag­Exited, set­On­Drag­Over, set­On­Input­Method­Text­Changed, set­On­Key­Pressed, set­On­Key­Released, set­On­Key­Typed, set­On­Mouse­Clicked, set­On­Mouse­Drag­Entered, set­On­Mouse­Drag­Exited, set­On­Mouse­Dragged, set­On­Mouse­Drag­Over, set­On­Mouse­Drag­Released, set­On­Mouse­Entered, set­On­Mouse­Exited, set­On­Mouse­Moved, set­On­Mouse­Pressed, set­On­Mouse­Released, set­On­Rotate, set­On­Rotation­Finished, set­On­Rotation­Started, set­On­Scroll, set­On­Scroll­Finished, set­On­Scroll­Started, set­On­Swipe­Down, set­On­Swipe­Left, set­On­Swipe­Right, set­On­Swipe­Up, set­On­Touch­Moved, set­On­Touch­Pressed, set­On­Touch­Released, set­On­Touch­Stationary, set­On­Zoom, set­On­Zoom­Finished, set­On­Zoom­Started, set­Opacity, set­Pick­On­Bounds, set­Pressed, set­Rotate, set­Rotation­Axis, set­Scale­X, set­Scale­Y, set­Scale­Z, set­Style, set­Translate­X, set­Translate­Y, set­Translate­Z, set­User­Data, set­View­Order, set­Visible, snapshot, snapshot, start­Drag­And­Drop, start­Full­Drag, style­Property, to­Back, to­Front, to­String, translate­XProperty, translate­YProperty, translate­ZProperty, uses­Mirroring, view­Order­Property, visible­Property</code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Object">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">get­Class</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hash­Code</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notify­All</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Styleable">Methods inherited from interface&nbsp;Styleable</h3>
<code>get­Styleable­Node</code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="onResourceLoaded">
<h3>onResourceLoaded</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<span class="return-type">ObjectProperty&lt;EventHandler&lt;<a href="ResourceEvent.html" title="class in org.apache.sis.gui.dataset">ResourceEvent</a>&gt;&gt;</span>&nbsp;<span class="element-name">onResourceLoaded</span></div>
<div class="block">Function to be called after a resource has been loaded from a file or URL.
The default value is <code>null</code>.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#loadResource(java.lang.Object)"><code>load­Resource(Object)</code></a></li>
<li><code>Resource­Event​.LOADED</code></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="onResourceClosed">
<h3>onResourceClosed</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<span class="return-type">ObjectProperty&lt;EventHandler&lt;<a href="ResourceEvent.html" title="class in org.apache.sis.gui.dataset">ResourceEvent</a>&gt;&gt;</span>&nbsp;<span class="element-name">onResourceClosed</span></div>
<div class="block">Function to be called after a resource has been closed from a file or URL.
The default value is <code>null</code>.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>1.2</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#removeAndClose(org.apache.sis.storage.Resource)"><code>remove­And­Close(Resource)</code></a></li>
<li><code>Resource­Event​.CLOSED</code></li>
</ul>
</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>ResourceTree</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">ResourceTree</span>()</div>
<div class="block">Creates a new tree of resources with initially no resource to show.
For showing a resource, invoke <a href="#setResource(org.apache.sis.storage.Resource)"><code>set­Resource(Resource)</code></a> after construction.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getResource()">
<h3>getResource</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../../storage/Resource.html" title="interface in org.apache.sis.storage">Resource</a></span>&nbsp;<span class="element-name">getResource</span>()</div>
<div class="block">Returns the root <a href="../../storage/Resource.html" title="interface in org.apache.sis.storage"><code>Resource</code></a> of this tree.
The returned value depends on how the resource was set:
<ul>
<li>If the resource was specified by <a href="#setResource(org.apache.sis.storage.Resource)"><code>set­Resource(Resource)</code></a>,
then this method returns that resource.
This is often (but not necessarily) a <a href="../../storage/DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a>.</li>
<li>If one or more resources were specified by <a href="#addResource(org.apache.sis.storage.Resource)"><code>add­Resource(Resource)</code></a>,
then this method returns an <a href="../../storage/Aggregate.html" title="interface in org.apache.sis.storage"><code>Aggregate</code></a> of all added resources.</li>
</ul></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>root <a href="../../storage/Resource.html" title="interface in org.apache.sis.storage"><code>Resource</code></a>, or <code>null</code> if none.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setResource(org.apache.sis.storage.Resource)">
<h3>setResource</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setResource</span><wbr><span class="parameters">(<a href="../../storage/Resource.html" title="interface in org.apache.sis.storage">Resource</a>&nbsp;resource)</span></div>
<div class="block">Sets the root <a href="../../storage/Resource.html" title="interface in org.apache.sis.storage"><code>Resource</code></a> of this tree.
The root resource is typically, but not necessarily, a <a href="../../storage/DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a> instance.
If another root resource existed before this method call, it is discarded without being closed.
Closing the previous resource is caller's responsibility.
<h4>Modified tree view properties</h4>
This method updates the <code>root</code> and <code>show­Root</code>
properties of <code>Tree­View</code> in an implementation-dependent way.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>resource</code> - the root resource to show, or <code>null</code> if none.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#addResource(org.apache.sis.storage.Resource)"><code>add­Resource(Resource)</code></a></li>
<li><a href="#removeAndClose(org.apache.sis.storage.Resource)"><code>remove­And­Close(Resource)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addResource(org.apache.sis.storage.Resource)">
<h3>addResource</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">addResource</span><wbr><span class="parameters">(<a href="../../storage/Resource.html" title="interface in org.apache.sis.storage">Resource</a>&nbsp;resource)</span></div>
<div class="block">Adds a resource in this tree below previously added resources.
This method does nothing if the given resource is already present in this tree.
<h4>Modified tree view properties</h4>
This method updates the <code>root</code> and <code>show­Root</code>
properties of <code>Tree­View</code> in an implementation-dependent way.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>resource</code> - the root resource to add, or <code>null</code> if none.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the given resource has been added, or <code>false</code>
if it was already presents or if the given resource is <code>null</code>.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#setResource(org.apache.sis.storage.Resource)"><code>set­Resource(Resource)</code></a></li>
<li><a href="#removeAndClose(org.apache.sis.storage.Resource)"><code>remove­And­Close(Resource)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="loadResource(java.lang.Object)">
<h3>loadResource</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">loadResource</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;source)</span></div>
<div class="block">Loads in a background thread the resources from the given source,
then <a href="#addResource(org.apache.sis.storage.Resource)">adds the resource</a> to this tree.
If the resource has already been loaded, then this method will use the
existing instance instead of loading the data again.
<h4>Notifications</h4>
If <a href="#onResourceLoaded"><code>on­Resource­Loaded</code></a> has a non-null value, the <code>Event­Handler</code> will be
notified in JavaFX thread after the background thread finished to open the resource.
If an exception occurs while opening the resource, then <code>Event­Handler</code> is not
notified and the error is reported in a dialog box instead.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>source</code> - the source of the resource to load. This is usually
a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/File.html" title="class or interface in java.io" class="external-link"><code>File</code></a> or <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/file/Path.html" title="class or interface in java.nio.file" class="external-link"><code>Path</code></a>.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="ResourceExplorer.html#loadResources(java.util.Collection)"><code>Resource­Explorer​.load­Resources(Collection)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="removeAndClose(org.apache.sis.storage.Resource)">
<h3>removeAndClose</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">removeAndClose</span><wbr><span class="parameters">(<a href="../../storage/Resource.html" title="interface in org.apache.sis.storage">Resource</a>&nbsp;resource)</span></div>
<div class="block">Removes the given resource from this tree and closes the resource if it is a <a href="../../storage/DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a> instance.
It is caller's responsibility to ensure that the given resource is not used anymore.
<p>Only the "root" resources (such as the resources given to <a href="#setResource(org.apache.sis.storage.Resource)"><code>set­Resource(Resource)</code></a> or
<a href="#addResource(org.apache.sis.storage.Resource)"><code>add­Resource(Resource)</code></a> methods) can be removed.
Children of <a href="../../storage/Aggregate.html" title="interface in org.apache.sis.storage"><code>Aggregate</code></a> resource are not scanned.
If the given resource cannot be removed, then this method does nothing.</p>
<h4>Notifications</h4>
If <a href="#onResourceClosed"><code>on­Resource­Closed</code></a> has a non-null value, the <code>Event­Handler</code> will be notified.
The notification may happen in same time that the resource is closing in a background thread.
If an exception occurs while closing the resource, the error is reported in a dialog box.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>resource</code> - the resource to remove. Null values are ignored.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#setResource(org.apache.sis.storage.Resource)"><code>set­Resource(Resource)</code></a></li>
<li><a href="#addResource(org.apache.sis.storage.Resource)"><code>add­Resource(Resource)</code></a></li>
<li><a href="ResourceExplorer.html#removeAndClose(org.apache.sis.storage.Resource)"><code>Resource­Explorer​.remove­And­Close(Resource)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2010&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>