jaxx.runtime.swing.navigation
Interface NavigationTreeNodeRenderer

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
NavigationTreeNodeRendererDecoratorImpl, NavigationTreeNodeRendererI18nImpl

public interface NavigationTreeNodeRenderer
extends java.io.Serializable

Text Renderer of a NavigationTreeNode.

This object will be placed as the DefaultMutableTreeNode.userObject of nodes.

In that way, we can use the toString() value to render the node without writing any TreeCellRenderer.

To rebuild the renderer text of a node use the method reload(Object) with the bean provides by the model for the node.

Since:
1.7.2, replace NavigationUtil#NodeRenderer which disappear soon...
Author:
chemit

Method Summary
 java.lang.Class<?> getInternalClass()
          Can override the the node internal class for display purpose.
 void reload(java.lang.Object bean)
          Reload the render value from the bean of node.
 java.lang.String toString()
           
 

Method Detail

toString

java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
the render value of the node

getInternalClass

java.lang.Class<?> getInternalClass()
Can override the the node internal class for display purpose.

Returns:
the type of data to be displayed.

reload

void reload(java.lang.Object bean)
Reload the render value from the bean of node.

Parameters:
bean - the bean associated to the node to render


Copyright © 2008-2009 CodeLutin. All Rights Reserved.