public class TapMetaTreeModel
extends java.lang.Object
implements javax.swing.tree.TreeModel
Constructor and Description |
---|
TapMetaTreeModel()
Constructs an empty tree model.
|
TapMetaTreeModel(SchemaMeta[] schemas)
Constructs a tree model to display a given table set.
|
Modifier and Type | Method and Description |
---|---|
void |
addTreeModelListener(javax.swing.event.TreeModelListener lnr) |
java.lang.Object |
getChild(java.lang.Object parent,
int index) |
int |
getChildCount(java.lang.Object parent) |
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child) |
java.lang.Object |
getRoot() |
static SchemaMeta |
getSchema(javax.swing.tree.TreePath path)
Acquires the schema metadata object, if any, associated with
a given tree path.
|
SchemaMeta[] |
getSchemas()
Returns the schemas array that forms the root of this tree model.
|
static TableMeta |
getTable(javax.swing.tree.TreePath path)
Acquires the table metadata object, if any, associated with
a given tree path.
|
boolean |
isLeaf(java.lang.Object node) |
void |
removeTreeModelListener(javax.swing.event.TreeModelListener lnr) |
void |
setSchemas(SchemaMeta[] schemas)
Sets the content of this tree.
|
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue) |
public TapMetaTreeModel()
public TapMetaTreeModel(SchemaMeta[] schemas)
schemas
- schema array defining the table metadata to be
representedpublic void setSchemas(SchemaMeta[] schemas)
schemas
- schema array defining the table metadata to be
representedpublic SchemaMeta[] getSchemas()
public java.lang.Object getRoot()
getRoot
in interface javax.swing.tree.TreeModel
public boolean isLeaf(java.lang.Object node)
isLeaf
in interface javax.swing.tree.TreeModel
public int getChildCount(java.lang.Object parent)
getChildCount
in interface javax.swing.tree.TreeModel
public java.lang.Object getChild(java.lang.Object parent, int index)
getChild
in interface javax.swing.tree.TreeModel
public int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
getIndexOfChild
in interface javax.swing.tree.TreeModel
public void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
valueForPathChanged
in interface javax.swing.tree.TreeModel
public void addTreeModelListener(javax.swing.event.TreeModelListener lnr)
addTreeModelListener
in interface javax.swing.tree.TreeModel
public void removeTreeModelListener(javax.swing.event.TreeModelListener lnr)
removeTreeModelListener
in interface javax.swing.tree.TreeModel
public static TableMeta getTable(javax.swing.tree.TreePath path)
path
- tree path associated with an instance of this classpublic static SchemaMeta getSchema(javax.swing.tree.TreePath path)
path
- tree path associated with an instance of this classCopyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.