Package org.abego.treelayout.demo.swing
Class SwingDemo
- java.lang.Object
-
- org.abego.treelayout.demo.swing.SwingDemo
-
public class SwingDemo extends java.lang.Object
Demonstrates how to use theTreeLayout
to render a tree in a Swing application.Intentionally the sample code is kept simple. I.e. it does not include stuff like anti-aliasing and other stuff one would add to make the output look nice.
Screenshot:
-
-
Constructor Summary
Constructors Constructor Description SwingDemo()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static TreeForTreeLayout<TextInBox>
getSampleTree(java.lang.String treeName)
static void
main(java.lang.String[] args)
Shows a dialog with a tree in a layout created byTreeLayout
, using the Swing componentTextInBoxTreePane
.private static void
showInDialog(javax.swing.JComponent panel)
-
-
-
Method Detail
-
showInDialog
private static void showInDialog(javax.swing.JComponent panel)
-
getSampleTree
private static TreeForTreeLayout<TextInBox> getSampleTree(java.lang.String treeName)
-
main
public static void main(java.lang.String[] args)
Shows a dialog with a tree in a layout created byTreeLayout
, using the Swing componentTextInBoxTreePane
.- Parameters:
args
- args[0]: treeName (default="")
-
-