Package eu.bandm.tools.util.ui
Class SwingBrowser
java.lang.Object
eu.bandm.tools.util.ui.SwingBrowser
Utilities to display data in Java swing windows.
-
Method Summary
Modifier and TypeMethodDescriptionstatic JFramedisplayTree(JTree tree, String windowname) Displays a treen on a Java swing panel.static JFramedisplayTree(JTree tree, String windowname, @Opt String buttonText, @Opt ActionListener buttonReaction, @Opt TreeSelectionListener selectionListener) Displays a treenode on a Java swing panel.static JFramedisplayTree(TreeNode tn, String windowname) Displays a treenode on a Java swing panel.static JFramedisplayTree(TreeNode tn, String windowname, @Opt String buttonText, @Opt ActionListener buttonReaction, @Opt TreeSelectionListener selectionListener) Displays a treenode on a Java swing panel.
-
Method Details
-
displayTree
Displays a treenode on a Java swing panel.- Parameters:
tn- the root of the tree of nodeswindowname- to be shown as title of the window- Returns:
- the created JFrame window object
-
displayTree
Displays a treen on a Java swing panel.- Parameters:
tree- the root of the tree of nodeswindowname- to be shown as title of the window- Returns:
- the created JFrame window object
-
displayTree
public static JFrame displayTree(TreeNode tn, String windowname, @Opt @Opt String buttonText, @Opt @Opt ActionListener buttonReaction, @Opt @Opt TreeSelectionListener selectionListener) Displays a treenode on a Java swing panel.- Parameters:
tn- the root of the tree of nodeswindowname- to be shown as title of the windowbuttonText- the text to show on an optional buttonbuttonReaction- what to do when the button is activatedselectionListener- what to do when a node is selected- Returns:
- the created JFrame window object
- See Also:
-
displayTree
public static JFrame displayTree(JTree tree, String windowname, @Opt @Opt String buttonText, @Opt @Opt ActionListener buttonReaction, @Opt @Opt TreeSelectionListener selectionListener) Displays a treenode on a Java swing panel. A JFrame (= a window) is created, filled with scroll bars and the tree graphic. If a button text is given, the buttonReaction may not be null, and a button with given text and reaction is inserted in the panel. When the selectionListener is not null, it is installed with single-node selection mode.- Parameters:
tree- a Java swing tree of nodeswindowname- to be shown as title of the windowbuttonText- the text to show on an optional buttonbuttonReaction- what to do when the button is activatedselectionListener- what to do when a node is selected- Returns:
- the created JFrame window object
-