edu.washington.biostr.sig.brainj3d.shwing.swing
Class CellRenderer

java.lang.Object
  extended by edu.washington.biostr.sig.brainj3d.shwing.swing.CellRenderer

public class CellRenderer
extends Object

This renderer knows how to render the defaults for ListCell's, TableCell's and TreeCell's and it knows how to render primitive arrays (they are rendered as "(arr[0], arr[1],...)"), IconText items (rendered as an icon and text), NamedItems and

Author:
eider

Field Summary
static VariableNumberFormat doubleFormat
           
static VariableNumberFormat intFormat
           
 
Constructor Summary
CellRenderer()
           
 
Method Summary
static String format(Object obj)
          Apply a consistent format to Number's and arrays of int[] and double[].
static CellExtractor getDefaultExtractor(Object o)
          Find the most specific Extractor for class c.
static void setDefaultExtractor(Class<?> c, CellExtractor extractor)
          Set the default extractor for a given class.
static Component setupComponent(Object obj, Icon ic, Component c, boolean useClosed)
          Run a final pass on a label for a renderer.
Currently this is mainly concerned with IconedItem's
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

doubleFormat

public static VariableNumberFormat doubleFormat

intFormat

public static VariableNumberFormat intFormat
Constructor Detail

CellRenderer

public CellRenderer()
Method Detail

setupComponent

public static Component setupComponent(Object obj,
                                       Icon ic,
                                       Component c,
                                       boolean useClosed)
Run a final pass on a label for a renderer.
Currently this is mainly concerned with IconedItem's

Parameters:
obj -
isSelected -
label -
Returns:

format

public static String format(Object obj)
Apply a consistent format to Number's and arrays of int[] and double[]. This will return a String for any type it knows and obj for unknown types.

Parameters:
obj -
Returns:

getDefaultExtractor

public static CellExtractor getDefaultExtractor(Object o)
Find the most specific Extractor for class c.

Parameters:
viewClass -
Returns:

setDefaultExtractor

public static void setDefaultExtractor(Class<?> c,
                                       CellExtractor extractor)
Set the default extractor for a given class.

Parameters:
c -
extractor -


Copyright © 2006 University of Washington. All Rights Reserved.