JHierarchicalList, an Extension to org.netbeans.swing.outline.Outline

  • submit to reddit
My name is Viacheslav, I live in Russia, and program in Java. For several years, I've been following with interest the development of the NetBeans Platform. At work, I've been mainly working on Java EE technology, while writing something for Swing and the NetBeans Platform has been something I've been doing in my spare time.

Here I want to show a component I wrote that inherits from org.netbeans.swing.outline.Outline. It is called JHierarchicalList. In contrast to the Outline component, JHierarchicalList does not display the entire tree, but only a single path.

I'd like to add that these changes do not affect the data model, since the main work is in the class extended from javax.swing.tree.AbstractLayoutCache.

On the left, you see Outline, on the right, JHierarchicalList:

Sources are being finalized, here is the demo JAR so far. Run it as follows:

java -jar demo-hierarchical-list.jar

 

AttachmentSize
demo-hierarchical-list.jar149.7 KB
0
Average: 5 (1 vote)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Anuradha Gunasekara replied on Mon, 2010/09/06 - 8:27am

nice work!

Vidhyadharan De... replied on Thu, 2010/09/16 - 4:52am

 Hi Viacheslav,

 I got this exception.. please corret me if i wrong.

 

Thanks

vidhya

 

D:\>java -jar demo-hierarchical-list.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

Viacheslav Rudyuk replied on Thu, 2010/09/16 - 9:11am

Probably installed on your system JRE 5. To start the application required JRE 6.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.