Package com.biglybt.ui.swt.config
Class FloatSwtParameter
- java.lang.Object
-
- com.biglybt.ui.swt.config.BaseSwtParameter<FloatSwtParameter,java.lang.Float>
-
- com.biglybt.ui.swt.config.FloatSwtParameter
-
- All Implemented Interfaces:
SwtParameter<java.lang.Float>
public class FloatSwtParameter extends BaseSwtParameter<FloatSwtParameter,java.lang.Float>
SWT Parameter representing a Float value Will always use 2 horizontal spaces in GridLayout
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FloatSwtParameter.ValueProcessor
Value Processor that's parameterized for this class and Float values-
Nested classes/interfaces inherited from class com.biglybt.ui.swt.config.BaseSwtParameter
BaseSwtParameter.IndentPaintListener
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
allowZero
private java.text.DecimalFormat
df
private float
fMaxValue
private float
fMinValue
private org.eclipse.swt.widgets.Text
inputField
private org.eclipse.swt.widgets.Label
lblSuffix
-
Fields inherited from class com.biglybt.ui.swt.config.BaseSwtParameter
change_listeners, KEY_LABEL_ADDCOPYTOCLIPMENU, paramID, pluginParam, validating, valueProcessor
-
Fields inherited from interface com.biglybt.ui.swt.config.SwtParameter
DEBUG
-
-
Constructor Summary
Constructors Constructor Description FloatSwtParameter(org.eclipse.swt.widgets.Composite composite, FloatParameterImpl pluginParam)
FloatSwtParameter(org.eclipse.swt.widgets.Composite composite, java.lang.String paramID, java.lang.String labelKey, java.lang.String suffixLabelKey, float minValue, float maxValue, boolean allowZero, int digitsAfterDecimal, SwtParameterValueProcessor<FloatSwtParameter,java.lang.Float> valueProcessor)
Make a float value selecting ui.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.widgets.Control[]
getControls()
void
refreshControl()
ParameterValidator.ValidationInfo
validate(java.lang.Float newValue)
-
Methods inherited from class com.biglybt.ui.swt.config.BaseSwtParameter
addAndFireChangeListener, addChangeListener, addLabelContextMenus, addValidator, createStandardLabel, debug, dispose, doGridData, getIndent, getMainControl, getParamID, getRelatedControl, getValue, getValueProcessor, informChanged, isDefaultValue, isDisposed, isEnabled, isIndentFancy, refreshSuffixControl, removeChangeListener, removeValidator, resetToDefault, setConfigValueProcessor, setEnabled, setIndent, setLabelKey, setLabelText, setLayoutData, setMainControl, setPluginParameter, setRelatedControl, setValue, setValueProcessor, setVisible, triggerChangeListeners, triggerSubClassChangeListeners, updateControl
-
-
-
-
Constructor Detail
-
FloatSwtParameter
public FloatSwtParameter(org.eclipse.swt.widgets.Composite composite, FloatParameterImpl pluginParam)
-
FloatSwtParameter
public FloatSwtParameter(org.eclipse.swt.widgets.Composite composite, java.lang.String paramID, java.lang.String labelKey, java.lang.String suffixLabelKey, float minValue, float maxValue, boolean allowZero, int digitsAfterDecimal, SwtParameterValueProcessor<FloatSwtParameter,java.lang.Float> valueProcessor)
Make a float value selecting ui. When parent composite is of GridLayout, resulting new widgets will take 2 columns- Parameters:
composite
- Where widgets will be placed. Composite is not alteredparamID
- ID of the parameter (usually config id)labelKey
- Messagebundle key for the text shown before text box. null for no label, "" to allocate blank labelsuffixLabelKey
- Messagebundle key for text shown after the text box null for no suffix label, "" to allocate blank suffix labelvalueProcessor
- null if you want to use COConfigurationManager
-
-
Method Detail
-
validate
public ParameterValidator.ValidationInfo validate(java.lang.Float newValue)
- Overrides:
validate
in classBaseSwtParameter<FloatSwtParameter,java.lang.Float>
-
refreshControl
public void refreshControl()
- Overrides:
refreshControl
in classBaseSwtParameter<FloatSwtParameter,java.lang.Float>
-
getControls
public org.eclipse.swt.widgets.Control[] getControls()
- Specified by:
getControls
in interfaceSwtParameter<java.lang.Float>
- Overrides:
getControls
in classBaseSwtParameter<FloatSwtParameter,java.lang.Float>
-
-