Class StringParameterImpl
java.lang.Object
com.biglybt.pifimpl.local.ui.config.ParameterImpl
com.biglybt.pifimpl.local.ui.config.StringParameterImpl
- All Implemented Interfaces:
ParameterListener
,ConfigParameter
,EnablerParameter
,Parameter
,ParameterWithHint
,ParameterWithSuffix
,StringParameter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private int
private String
private int
private String
private boolean
private int
Fields inherited from class com.biglybt.pifimpl.local.ui.config.ParameterImpl
configKey
Fields inherited from interface com.biglybt.pif.ui.config.Parameter
MODE_ADVANCED, MODE_BEGINNER, MODE_INTERMEDIATE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStringValidator
(ParameterValidator<String> stringParamValidator) Same asParameter.addValidator(ParameterValidator)
, but casts the "toValue" to String.Get the messagebundle key for the Parameter's hint.int
int
Get the character limit for ParametergetValue()
Retrieve the parameter's value as an Object.int
boolean
void
setHintKey
(String hintKey) Sets the widget message to a messagebundle key.void
setHintText
(String text) Sets the widget message.void
setMultiLine
(int visible_line_count) void
setSuffixLabelKey
(String suffixLabelKey) void
setSuffixLabelText
(String text) void
setTextLimit
(int textLimit) Limit the number of characters for Parametervoid
setValidChars
(String chars, boolean caseSensitive) Limit characters to a listvoid
void
setWidthInCharacters
(int widthInCharacters) Set a width hint for displaying the text fieldMethods inherited from class com.biglybt.pifimpl.local.ui.config.ParameterImpl
addAndFireListener, addConfigParameterListener, addDisabledOnSelection, addDisabledOnSelection, addEnabledOnSelection, addEnabledOnSelection, addImplListener, addListener, addValidator, destroy, fireParameterChanged, getConfigKeyName, getDisabledOnSelectionParameters, getEnabledOnSelectionParameters, getGenerateIntermediateEvents, getGroup, getIndent, getKey, getLabelKey, getLabelText, getMinimumRequiredUserMode, getReferenceID, hasBeenSet, isEnabled, isForUIType, isIndentFancy, isVisible, parameterChanged, refreshControl, removeConfigParameterListener, removeImplListener, removeListener, resetToDefault, search, setAllowedUiTypes, setEnabled, setGenerateIntermediateEvents, setGroup, setIndent, setLabelKey, setLabelText, setMinimumRequiredUserMode, setReferenceID, setVisible, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.pif.config.ConfigParameter
addConfigParameterListener, removeConfigParameterListener
Methods inherited from interface com.biglybt.pif.ui.config.Parameter
addAndFireListener, addListener, addValidator, getConfigKeyName, getGenerateIntermediateEvents, getLabelKey, getLabelText, getMinimumRequiredUserMode, hasBeenSet, isEnabled, isForUIType, isVisible, removeListener, resetToDefault, setAllowedUiTypes, setEnabled, setGenerateIntermediateEvents, setIndent, setLabelKey, setLabelText, setMinimumRequiredUserMode, setVisible
-
Field Details
-
line_count
private int line_count -
widthInCharacters
private int widthInCharacters -
validChars
-
validCharsCaseSensitive
private boolean validCharsCaseSensitive -
suffixLabelKey
-
textLimit
private int textLimit -
hintKey
-
-
Constructor Details
-
StringParameterImpl
-
-
Method Details
-
getValue
- Specified by:
getValue
in interfaceStringParameter
-
setValue
- Specified by:
setValue
in interfaceStringParameter
-
setMultiLine
public void setMultiLine(int visible_line_count) - Specified by:
setMultiLine
in interfaceStringParameter
- Parameters:
visible_line_count
-
-
getMultiLine
public int getMultiLine() -
setWidthInCharacters
public void setWidthInCharacters(int widthInCharacters) Description copied from interface:StringParameter
Set a width hint for displaying the text field- Specified by:
setWidthInCharacters
in interfaceStringParameter
-
getWidthInCharacters
public int getWidthInCharacters()- Specified by:
getWidthInCharacters
in interfaceStringParameter
- Returns:
- width hint in characters for displaying the text field
-
setValidChars
Description copied from interface:StringParameter
Limit characters to a list- Specified by:
setValidChars
in interfaceStringParameter
-
addStringValidator
Description copied from interface:StringParameter
Same asParameter.addValidator(ParameterValidator)
, but casts the "toValue" to String.- Specified by:
addStringValidator
in interfaceStringParameter
- See Also:
-
getValidChars
-
isValidCharsCaseSensitive
public boolean isValidCharsCaseSensitive() -
getSuffixLabelKey
- Specified by:
getSuffixLabelKey
in interfaceParameterWithSuffix
-
setSuffixLabelKey
- Specified by:
setSuffixLabelKey
in interfaceParameterWithSuffix
-
setSuffixLabelText
- Specified by:
setSuffixLabelText
in interfaceParameterWithSuffix
-
setTextLimit
public void setTextLimit(int textLimit) Description copied from interface:StringParameter
Limit the number of characters for Parameter- Specified by:
setTextLimit
in interfaceStringParameter
-
getTextLimit
public int getTextLimit()Description copied from interface:StringParameter
Get the character limit for Parameter- Specified by:
getTextLimit
in interfaceStringParameter
-
getHintKey
Description copied from interface:ParameterWithHint
Get the messagebundle key for the Parameter's hint. Hints are usually only displayed when the field is empty.- Specified by:
getHintKey
in interfaceParameterWithHint
-
setHintKey
Description copied from interface:ParameterWithHint
Sets the widget message to a messagebundle key. The message text is displayed as a hint for the user, indicating the purpose of the field. Hints are usually only displayed when the field is empty.- Specified by:
setHintKey
in interfaceParameterWithHint
-
setHintText
Description copied from interface:ParameterWithHint
Sets the widget message. The text is displayed as a hint for the user, indicating the purpose of the field. Hints are usually only displayed when the field is empty.- Specified by:
setHintText
in interfaceParameterWithHint
-
getValueObject
Description copied from interface:Parameter
Retrieve the parameter's value as an Object. Subclasses will usually have a getValue() that will return a specific type.- Specified by:
getValueObject
in interfaceParameter
- Overrides:
getValueObject
in classParameterImpl
-