Package io.guise.framework.component
Class AbstractListSelectContainerControl.ComponentRepresentationStrategy
java.lang.Object
io.guise.framework.component.AbstractListSelectContainerControl.ComponentRepresentationStrategy
- All Implemented Interfaces:
ListSelectControl.ValueRepresentationStrategy<Component>
- Enclosing class:
- AbstractListSelectContainerControl
public static class AbstractListSelectContainerControl.ComponentRepresentationStrategy
extends Object
implements ListSelectControl.ValueRepresentationStrategy<Component>
A strategy for to represent components in a list select model as themselves.
- Author:
- Garret Wilson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateComponent
(ListSelectModel<Component> model, Component value, int index, boolean selected, boolean focused) Creates a component for the given list value.
-
Constructor Details
-
ComponentRepresentationStrategy
public ComponentRepresentationStrategy()
-
-
Method Details
-
createComponent
public Component createComponent(ListSelectModel<Component> model, Component value, int index, boolean selected, boolean focused) Creates a component for the given list value.This implementation returns the component value itself.
- Specified by:
createComponent
in interfaceListSelectControl.ValueRepresentationStrategy<Component>
- Parameters:
model
- The model containing the value.value
- The value for which a component should be created.index
- The index of the value within the list, or -1 if the value is not in the list (e.g. for representing no selection).selected
-true
if the value is selected.focused
-true
if the value has the focus.- Returns:
- A new component to represent the given value.
-