|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.guiseframework.component.AbstractListSelectControl.ConverterInfoModelValueRepresentationStrategy<VV>
VV - The type of value the strategy is to represent.public static class AbstractListSelectControl.ConverterInfoModelValueRepresentationStrategy<VV>
A list select value representation strategy that creates a component by converting the value to a info model.
The specified component class must have a constructor that takes a single InfoModel as an argument.
| Constructor Summary | |
|---|---|
AbstractListSelectControl.ConverterInfoModelValueRepresentationStrategy(java.lang.Class<? extends Component> componentClass,
Converter<VV,java.lang.String> converter)
Converter constructor. |
|
AbstractListSelectControl.ConverterInfoModelValueRepresentationStrategy(java.lang.Class<VV> valueClass,
java.lang.Class<? extends Component> componentClass)
Value class constructor with a default converter. |
|
| Method Summary | |
|---|---|
Component |
createComponent(ListSelectModel<VV> model,
VV value,
int index,
boolean selected,
boolean focused)
Creates a component for the given list value. |
Converter<VV,java.lang.String> |
getConverter()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractListSelectControl.ConverterInfoModelValueRepresentationStrategy(java.lang.Class<VV> valueClass,
java.lang.Class<? extends Component> componentClass)
DefaultStringLiteralConverter.
valueClass - The class indicating the type of value to convert.componentClass - The class of component to create.
java.lang.NullPointerException - if the given value class and/or component class is null.
java.lang.IllegalArgumentException - if the given component class does not have a constructor with a single InfoModel constructor.
public AbstractListSelectControl.ConverterInfoModelValueRepresentationStrategy(java.lang.Class<? extends Component> componentClass,
Converter<VV,java.lang.String> converter)
converter - The converter to use for displaying the value as a string.componentClass - The class of component to create.
java.lang.NullPointerException - if the given converter is null.
java.lang.IllegalArgumentException - if the given component class does not have a constructor with a single InfoModel constructor.| Method Detail |
|---|
public Converter<VV,java.lang.String> getConverter()
public Component createComponent(ListSelectModel<VV> model,
VV value,
int index,
boolean selected,
boolean focused)
createComponent in interface ListSelectControl.ValueRepresentationStrategy<VV>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.
getConverter()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||