Modifier | Constructor and Description |
---|---|
|
TapServiceTreeModel(String rootLabel)
Constructs an instance with no entries.
|
protected |
TapServiceTreeModel(String rootLabel,
TapServiceFinder.Service[] services,
Map<TapServiceFinder.Service,TapServiceFinder.Table[]> tableMap)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addTreeModelListener(TreeModelListener lnr) |
static TreeCellRenderer |
createCellRenderer()
Returns a cell renderer suitable for rendering nodes of a JTree
using a model of this class.
|
Object |
getChild(Object parent,
int index) |
int |
getChildCount(Object parent) |
int |
getIndexOfChild(Object parent,
Object child) |
Object |
getRoot() |
static TapServiceFinder.Service |
getService(TreePath path)
Returns a service in the ancestry of a supplied path.
|
static TreePath |
getServicePath(TreePath path)
Returns a tree path which correponds to a TAP service, and which
is an ancestor of the supplied path.
|
static TapServiceFinder.Table |
getTable(TreePath path)
Returns a table that forms part of a supplied path.
|
boolean |
isLeaf(Object node) |
static TapServiceTreeModel |
readTreeModel(TapServiceFinder.Service[] allServices,
TapServiceFinder finder,
TapServiceFinder.Constraint constraint)
Constructs a tree model based on some given constraints.
|
void |
removeTreeModelListener(TreeModelListener lnr) |
void |
valueForPathChanged(TreePath path,
Object newValue) |
protected TapServiceTreeModel(String rootLabel, TapServiceFinder.Service[] services, Map<TapServiceFinder.Service,TapServiceFinder.Table[]> tableMap)
rootLabel
- text label for root element (may be null)services
- list of services nodes in treetableMap
- array of tables providing child nodes for each service;
may be null if no table children are required,
but if not null must contain an entry for each servicepublic TapServiceTreeModel(String rootLabel)
rootLabel
- text label for root element (may be null)public int getChildCount(Object parent)
getChildCount
in interface TreeModel
public int getIndexOfChild(Object parent, Object child)
getIndexOfChild
in interface TreeModel
public void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged
in interface TreeModel
public void addTreeModelListener(TreeModelListener lnr)
addTreeModelListener
in interface TreeModel
public void removeTreeModelListener(TreeModelListener lnr)
removeTreeModelListener
in interface TreeModel
public static TreePath getServicePath(TreePath path)
path
- path to examinepublic static TapServiceFinder.Service getService(TreePath path)
path
- path to examinepublic static TapServiceFinder.Table getTable(TreePath path)
path
- path to examinepublic static TapServiceTreeModel readTreeModel(TapServiceFinder.Service[] allServices, TapServiceFinder finder, TapServiceFinder.Constraint constraint) throws IOException
allServices
- list of all services that may be relevantfinder
- object that can search for TAP servicesconstraint
- defines the services of interest;
if null, all are usedIOException
public static TreeCellRenderer createCellRenderer()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.