01: package org.uispec4j;
02:
03: import java.awt.*;
04:
05: /**
06: * Performs a conversion between internal and tested cell values in a {@link Tree} component
07: *
08: * @see Tree#setCellValueConverter
09: */
10: public interface TreeCellValueConverter {
11:
12: /**
13: * Returns the textual representation of the given tree object
14: *
15: * @param renderedComponent the Component returned by the JTree's renderer
16: * @param modelObject the Object returned by the JTree's internal model
17: */
18: String getValue(Component renderedComponent, Object modelObject);
19:
20: /**
21: * Indicates whether the given tree object is painted in bold
22: */
23: boolean isBold(Component renderedComponent, Object modelObject);
24:
25: /**
26: * Returns the foreground color used in the representation of the object
27: */
28: Color getForeground(Component renderedComponent, Object modelObject);
29: }
|