| |
|
| java.lang.Object javax.swing.tree.DefaultMutableTreeNode org.isqlviewer.model.SchemaNode
SchemaNode | final public class SchemaNode extends DefaultMutableTreeNode implements Transferable(Code) | | TreeNode class for distinguinshing different nodes by a given type within a tree.
This node class should alleviate and provide more flexiblility to the structure of the JdbcSchema tree so that nodes
can be indentified by an enumerated type instead of making a guess by the name of the node itself as to what data it
actually represents in the JDBC Schema.
author: Mark A. Kobold <mkobold at isqlviewer dot com> version: 1.0 |
SchemaNode | public SchemaNode(SchemaNodeType nodeType)(Code) | | Creates a tree node that has no parent and no children, but which allows children.
Parameters: nodeType - type of node this instance represents. throws: NullPointerException - if nodeType is null. |
SchemaNode | public SchemaNode(Object userObject, SchemaNodeType nodeType)(Code) | | Creates a tree node with no parent, no children.
This instance will be one that allows children, and initializes it with the specified user object.
Parameters: userObject - an Object provided by the user that constitutes the node's data Parameters: nodeType - type of node this instance represents. throws: NullPointerException - if nodeType is null. |
SchemaNode | public SchemaNode(Object userObject, boolean allowsChildren, SchemaNodeType nodeType)(Code) | | Creates a tree node with no parent, no children.
This instance will be initialized with the specified user object, and that allows children only if specified.
Parameters: userObject - an Object provided by the user that constitutes the node's data Parameters: allowsChildren - if true, the node is allowed to have child nodes -- otherwise, it is always a leaf node Parameters: nodeType - type of node this instance represents. throws: NullPointerException - if nodeType is null. |
getNodeType | public SchemaNodeType getNodeType()(Code) | | Gets the current type of schema node this represenents.
type of node within the JDBC Schema is being represented. |
isDataFlavorSupported | public boolean isDataFlavorSupported(DataFlavor flavor)(Code) | | |
isHasError | public boolean isHasError()(Code) | | Return true if this node loaded with an error.
Since most schema nodes are loaded via the database this allows a state to be saved to the node if parent or
child had an error during the loading process.
true if this node expierenced some sort of SQL Exception during initialization. |
isNoncached | public boolean isNoncached()(Code) | | |
setHasError | public synchronized void setHasError(boolean hasError)(Code) | | Sets the error flag to the appropriate value.
Parameters: hasError - value to indicate if the node expierenced and error.F |
|
|
|