org.uispec4j
Class DefaultTreeCellValueConverter

java.lang.Object
  extended by org.uispec4j.DefaultTreeCellValueConverter
All Implemented Interfaces:
TreeCellValueConverter

public class DefaultTreeCellValueConverter
extends java.lang.Object
implements TreeCellValueConverter

Default implementation for the TreeCellValueConverter interface. This converter returns the text displayed by JLabel components only - it will throw an exception if another renderer component is not used.


Constructor Summary
DefaultTreeCellValueConverter()
           
 
Method Summary
 java.awt.Color getForeground(java.awt.Component renderedComponent, java.lang.Object modelObject)
          Returns the foreground color used in the representation of the object
protected  javax.swing.JLabel getLabel(java.awt.Component renderedComponent)
           
 java.lang.String getValue(java.awt.Component renderedComponent, java.lang.Object modelObject)
          Returns the textual representation of the given tree object
 boolean isBold(java.awt.Component renderedComponent, java.lang.Object modelObject)
          Indicates whether the given tree object is painted in bold
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTreeCellValueConverter

public DefaultTreeCellValueConverter()
Method Detail

getValue

public java.lang.String getValue(java.awt.Component renderedComponent,
                                 java.lang.Object modelObject)
Description copied from interface: TreeCellValueConverter
Returns the textual representation of the given tree object

Specified by:
getValue in interface TreeCellValueConverter
Parameters:
renderedComponent - the Component returned by the JTree's renderer
modelObject - the Object returned by the JTree's internal model

isBold

public boolean isBold(java.awt.Component renderedComponent,
                      java.lang.Object modelObject)
Description copied from interface: TreeCellValueConverter
Indicates whether the given tree object is painted in bold

Specified by:
isBold in interface TreeCellValueConverter

getForeground

public java.awt.Color getForeground(java.awt.Component renderedComponent,
                                    java.lang.Object modelObject)
Description copied from interface: TreeCellValueConverter
Returns the foreground color used in the representation of the object

Specified by:
getForeground in interface TreeCellValueConverter

getLabel

protected javax.swing.JLabel getLabel(java.awt.Component renderedComponent)


Copyright © 2004-2010. All Rights Reserved.