Package qupath.lib.gui.panes
Class ObjectTreeBrowser
java.lang.Object
qupath.lib.gui.panes.ObjectTreeBrowser
Simple browser for exploring fields (including private fields) within an object by reflection.
- Author:
- Pete Bankhead
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TreeTableView
<JsonElement> createJsonTreeBrowser
(String name, Object object) Create aTreeTableView
showing the names and values of fields within aJsonElement
.static TreeTableView
<Object> createObjectTreeBrowser
(String name, Object object) Create aTreeTableView
showing the names and values of object fields, accessed via reflection.
-
Constructor Details
-
ObjectTreeBrowser
public ObjectTreeBrowser()
-
-
Method Details
-
createObjectTreeBrowser
Create aTreeTableView
showing the names and values of object fields, accessed via reflection.- Parameters:
name
- root name used to identify the provided objectobject
- the object whose fields should be inspected- Returns:
- a view depicting object fields
-
createJsonTreeBrowser
Create aTreeTableView
showing the names and values of fields within aJsonElement
.- Parameters:
name
- root name used to identify the provided objectobject
- the object whose fields should be inspected. If this is not already aJsonElement
, an attempt will be made to convert it usingGsonTools
.- Returns:
- a view depicting element fields
-