Package com.simsilica.lemur
Interface ValueRenderer<T>
- All Known Subinterfaces:
CellRenderer<T>
- All Known Implementing Classes:
DefaultCellRenderer
,DefaultValueRenderer
public interface ValueRenderer<T>
For a given value, classes that implement this interface will
provide a Panel that can display that value. A ValueRenderer
will often be reused for several values at a time (for example
displaying the items of a list) which is why the 'existing'
panel is provided for reuse. This is in contrast to a ValueEditor
that will only be activated for one specific value at a time.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configureStyle
(ElementId elementId, String style) Called by the using component to set the preferred ElementId and style for the renderer.Returns a new view Panel or returns a reconfigured version of the existing Panel that will display the specified value.
-
Method Details
-
configureStyle
Called by the using component to set the preferred ElementId and style for the renderer. Implementations can ignore this if they wish to override the default element ID or style. -
getView
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.
-