Class DefaultCellRenderer<T>

java.lang.Object
com.simsilica.lemur.list.DefaultCellRenderer<T>
All Implemented Interfaces:
CellRenderer<T>, ValueRenderer<T>, Cloneable

public class DefaultCellRenderer<T> extends Object implements CellRenderer<T>, Cloneable
  • Constructor Details

    • DefaultCellRenderer

      public DefaultCellRenderer()
    • DefaultCellRenderer

      public DefaultCellRenderer(String style)
    • DefaultCellRenderer

      public DefaultCellRenderer(ElementId elementId, String style)
    • DefaultCellRenderer

      public DefaultCellRenderer(ElementId elementId, String style, Function<T,String> transform)
  • Method Details

    • clone

      public DefaultCellRenderer<T> clone()
      Overrides:
      clone in class Object
    • configureStyle

      public void configureStyle(ElementId elementId, String style)
      Default implementation uses the specified style unless the renderer already has an elementId and style set.
      Specified by:
      configureStyle in interface ValueRenderer<T>
    • setTransform

      public void setTransform(Function<T,String> transform)
    • getTransform

      public Function<T,String> getTransform()
    • getElement

      @Deprecated public ElementId getElement()
      Deprecated.
      This was a typo that went into a release. Use getElementId() instead.
    • getElementId

      public ElementId getElementId()
    • getStyle

      public String getStyle()
    • valueToString

      protected String valueToString(T value)
    • getView

      public Panel getView(T value, boolean selected, Panel existing)
      Description copied from interface: ValueRenderer
      Returns a new view Panel or returns a reconfigured version of the existing Panel that will display the specified value. The 'selected' flag can indicate if the value should appear as selected or focused. For example, some views may change their color or animate if they are the selected view.
      Specified by:
      getView in interface CellRenderer<T>
      Specified by:
      getView in interface ValueRenderer<T>