public class ListBoxValues extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ListBoxValues.ValueTester |
Modifier and Type | Field and Description |
---|---|
protected List<String> |
acceptableValuesWithCustomValues |
protected List<String> |
acceptableValuesWithoutCustomValues |
protected String |
customPrompt |
protected List<String> |
customValues |
protected static int |
DEFAULT_MAX_DISPLAY_LENGTH |
static String |
EDIT_SUFFIX |
protected String |
editPrefix |
protected Map<String,String> |
mapDisplayValuesToValues |
protected int |
maxDisplayLength |
Constructor and Description |
---|
ListBoxValues(String customPrompt,
String editPrefix,
ListBoxValues.ValueTester valueTester) |
ListBoxValues(String customPrompt,
String editPrefix,
ListBoxValues.ValueTester valueTester,
int maxDisplayLength) |
Modifier and Type | Method and Description |
---|---|
String |
addCustomValue(String newValue,
String oldValue) |
protected String |
addDisplayValue(String value)
Function for handling values which are longer than MAX_DISPLAY_LENGTH such as very long string constants.
|
void |
addValues(List<String> acceptableValues) |
protected void |
clear() |
protected List<String> |
createDisplayValues(List<String> acceptableValues) |
List<String> |
getAcceptableValuesWithCustomValues() |
List<String> |
getAcceptableValuesWithoutCustomValues() |
String |
getEditPrefix() |
protected String |
getEditValuePrompt(String editPrefix) |
String |
getNonCustomValueForUserString(String userValue) |
String |
getValueForDisplayValue(String key)
Returns real unquoted value for a DisplayValue
|
boolean |
isCustomValue(String value) |
String |
toString() |
List<String> |
update(String currentValue) |
protected String customPrompt
protected String editPrefix
public static final String EDIT_SUFFIX
protected int maxDisplayLength
protected static final int DEFAULT_MAX_DISPLAY_LENGTH
public ListBoxValues(String customPrompt, String editPrefix, ListBoxValues.ValueTester valueTester, int maxDisplayLength)
public ListBoxValues(String customPrompt, String editPrefix, ListBoxValues.ValueTester valueTester)
public String getEditPrefix()
public boolean isCustomValue(String value)
protected void clear()
protected String addDisplayValue(String value)
value
- the valuepublic String getValueForDisplayValue(String key)
key
- Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.