|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.resources.OptionalDependencies
public final class OptionalDependencies
Bridges to optional dependencies (especially widget-swing
module).
Method Summary | |
---|---|
static javax.swing.tree.MutableTreeNode |
copy(javax.swing.tree.TreeNode node)
Returns a copy of the tree starting at the given node. |
static javax.swing.tree.DefaultMutableTreeNode |
createTreeNode(java.lang.String name,
java.lang.Object object,
boolean allowsChildren)
Creates an initially empty tree node. |
static void |
format(javax.swing.tree.TreeModel tree,
java.lang.Appendable buffer,
java.lang.String lineSeparator)
Writes a graphical representation of the specified tree model in the given buffer. |
static void |
format(javax.swing.tree.TreeNode node,
java.lang.Appendable buffer,
java.lang.String lineSeparator)
Writes a graphical representation of the specified tree in the given buffer. |
static void |
show(javax.swing.tree.TreeModel tree,
java.lang.String title)
Display the given tree in a Swing frame. |
static void |
show(javax.swing.tree.TreeNode node,
java.lang.String title)
Display the given tree in a Swing frame. |
static java.lang.String |
toString(javax.swing.tree.TreeModel tree)
Returns a graphical representation of the specified tree model. |
static java.lang.String |
toString(javax.swing.tree.TreeNode node)
Returns a graphical representation of the specified tree. |
static javax.swing.tree.MutableTreeNode |
xmlToSwing(org.w3c.dom.Node node)
Creates a Swing root tree node from a XML root tree node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static javax.swing.tree.DefaultMutableTreeNode createTreeNode(java.lang.String name, java.lang.Object object, boolean allowsChildren)
name
- The value to be returned by TreeNode#toString
.object
- The user object to be returned by the tree node. May
or may not be the same than name
.allowsChildren
- if children are allowed.public static javax.swing.tree.MutableTreeNode xmlToSwing(org.w3c.dom.Node node)
toString(TreeNode)
, this method provides a convenient way to print
the content of a XML document for debugging purpose.
This method should not be defined here, since this class is about optional dependencies.
It should be defined in org.geotools.gui.swing.tree.Trees
instead. However we put
it here (for now) because it is used in some module that don't want to depend on widgets.
public static javax.swing.tree.MutableTreeNode copy(javax.swing.tree.TreeNode node)
tree
- The tree to copy (may be null
).
null
if the tree was null.public static void format(javax.swing.tree.TreeModel tree, java.lang.Appendable buffer, java.lang.String lineSeparator) throws java.io.IOException
This method should not be defined here, since this class is about optional dependencies.
It should be defined in org.geotools.gui.swing.tree.Trees
instead. However we put
it here (for now) because it is used in some module that don't want to depend on widgets.
tree
- The tree to format.buffer
- Where to format the tree.lineSeparator
- The line separator, or null
for the system default.
java.io.IOException
- if an error occured while writting in the given buffer.public static void format(javax.swing.tree.TreeNode node, java.lang.Appendable buffer, java.lang.String lineSeparator) throws java.io.IOException
This method should not be defined here, since this class is about optional dependencies.
It should be defined in org.geotools.gui.swing.tree.Trees
instead. However we put
it here (for now) because it is used in some module that don't want to depend on widgets.
node
- The root node of the tree to format.buffer
- Where to format the tree.lineSeparator
- The line separator, or null
for the system default.
java.io.IOException
- if an error occured while writting in the given buffer.public static java.lang.String toString(javax.swing.tree.TreeModel tree)
This method should not be defined here, since this class is about optional dependencies.
It should be defined in org.geotools.gui.swing.tree.Trees
instead. However we put
it here (for now) because it is used in some module that don't want to depend on widgets.
tree
- The tree to format.
null
if it doesn't contain any node.public static java.lang.String toString(javax.swing.tree.TreeNode node)
This method should not be defined here, since this class is about optional dependencies.
It should be defined in org.geotools.gui.swing.tree.Trees
instead. However we put
it here (for now) because it is used in some module that don't want to depend on widgets.
node
- The root node of the tree to format.
null
if it doesn't contain any node.public static void show(javax.swing.tree.TreeNode node, java.lang.String title)
tree
- The tree to display in a Swing frame.title
- The frame title, or null
if none.public static void show(javax.swing.tree.TreeModel tree, java.lang.String title)
tree
- The tree to display in a Swing frame.title
- The frame title, or null
if none.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |