net.sf.jga.swing

Class GenericListCellRenderer<T,R>

public class GenericListCellRenderer<T,R> extends DefaultListCellRenderer

ListCellRenderer that passes the contents through a functor to render the contents, instead of calling toString() on the contents. (It does, however, call toString() on the result, so it isn't necessary that the functor return a String).

Copyright © 2002 David A. Hall

Author: David A. Hall

Constructor Summary
GenericListCellRenderer(UnaryFunctor<T,R> uf)
Method Summary
ComponentgetListCellRendererComponent(JList list, Object value, int idx, boolean sel, boolean focus)

Constructor Detail

GenericListCellRenderer

public GenericListCellRenderer(UnaryFunctor<T,R> uf)

Method Detail

getListCellRendererComponent

public Component getListCellRendererComponent(JList list, Object value, int idx, boolean sel, boolean focus)