Package com.biglybt.ui.swt.config
Class IntSwtParameter
java.lang.Object
com.biglybt.ui.swt.config.BaseSwtParameter<IntSwtParameter,Integer>
com.biglybt.ui.swt.config.IntSwtParameter
- All Implemented Interfaces:
SwtParameter<Integer>
SWT widget representing an Int Parameter
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.biglybt.ui.swt.config.BaseSwtParameter
BaseSwtParameter.IndentPaintListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private org.eclipse.swt.graphics.Color
private boolean
private int
private int
private boolean
private org.eclipse.swt.widgets.Label
private final org.eclipse.swt.widgets.Spinner
private TimerEvent
private TimerEventPerformer
private int
Fields inherited from class com.biglybt.ui.swt.config.BaseSwtParameter
change_listeners, paramID, pluginParam, validating, valueProcessor
Fields inherited from interface com.biglybt.ui.swt.config.SwtParameter
DEBUG
-
Constructor Summary
ConstructorsConstructorDescriptionIntSwtParameter
(org.eclipse.swt.widgets.Composite composite, IntParameterImpl param) IntSwtParameter
(org.eclipse.swt.widgets.Composite composite, String paramID, String labelKey, String suffixLabelKey, int minValue, int maxValue, SwtParameterValueProcessor<IntSwtParameter, Integer> valueProcessor) Make a int value selecting ui.IntSwtParameter
(org.eclipse.swt.widgets.Composite composite, String paramID, String labelKey, String suffixKey, SwtParameterValueProcessor<IntSwtParameter, Integer> valueProcessor) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
org.eclipse.swt.widgets.Control[]
int
boolean
void
void
setMaximumValue
(int value) void
setMinimumValue
(int value) void
setSuffixLabelKey
(String suffixLabelKey) void
setSuffixLabelText
(String text) void
setZeroHidden
(boolean isZeroHidden) 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
-
Field Details
-
valueWhenBlank
private int valueWhenBlank -
colorHidden
private org.eclipse.swt.graphics.Color colorHidden -
lblSuffix
private org.eclipse.swt.widgets.Label lblSuffix -
iMinValue
private int iMinValue -
iMaxValue
private int iMaxValue -
bTriggerOnFocusOut
private boolean bTriggerOnFocusOut -
spinner
private final org.eclipse.swt.widgets.Spinner spinner -
timedSaveEvent
-
timerEventSave
-
isZeroHidden
private boolean isZeroHidden -
disableTimedSave
private boolean disableTimedSave
-
-
Constructor Details
-
IntSwtParameter
-
IntSwtParameter
public IntSwtParameter(org.eclipse.swt.widgets.Composite composite, String paramID, String labelKey, String suffixKey, SwtParameterValueProcessor<IntSwtParameter, Integer> valueProcessor) -
IntSwtParameter
public IntSwtParameter(org.eclipse.swt.widgets.Composite composite, String paramID, String labelKey, String suffixLabelKey, int minValue, int maxValue, SwtParameterValueProcessor<IntSwtParameter, Integer> valueProcessor) Make a int 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 Details
-
cancelTimedSaveEvent
private void cancelTimedSaveEvent() -
setMinimumValue
public void setMinimumValue(int value) -
setMaximumValue
public void setMaximumValue(int value) -
validate
- Overrides:
validate
in classBaseSwtParameter<IntSwtParameter,
Integer>
-
refreshControl
public void refreshControl()- Overrides:
refreshControl
in classBaseSwtParameter<IntSwtParameter,
Integer>
-
getIntValue
public int getIntValue() -
getControls
public org.eclipse.swt.widgets.Control[] getControls()- Specified by:
getControls
in interfaceSwtParameter<Integer>
- Overrides:
getControls
in classBaseSwtParameter<IntSwtParameter,
Integer>
-
disableTimedSave
public void disableTimedSave() -
isZeroHidden
public boolean isZeroHidden() -
setZeroHidden
public void setZeroHidden(boolean isZeroHidden) -
setSuffixLabelKey
-
setSuffixLabelText
-