Package com.biglybt.ui.swt.config
Class IntListSwtParameter
- java.lang.Object
-
- com.biglybt.ui.swt.config.BaseSwtParameter<IntListSwtParameter,java.lang.Integer>
-
- com.biglybt.ui.swt.config.IntListSwtParameter
-
- All Implemented Interfaces:
SwtParameter<java.lang.Integer>
public class IntListSwtParameter extends BaseSwtParameter<IntListSwtParameter,java.lang.Integer>
SWT Parameter for selecting from a list of int values Displayed as Combo box. Will always use 2 horizontal spaces in GridLayout
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
IntListSwtParameter.ValueProcessor
-
Nested classes/interfaces inherited from class com.biglybt.ui.swt.config.BaseSwtParameter
BaseSwtParameter.IndentPaintListener
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.widgets.Label
lblSuffix
private org.eclipse.swt.widgets.Combo
list
private int[]
values
-
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 IntListSwtParameter(org.eclipse.swt.widgets.Composite composite, IntListParameterImpl param)
IntListSwtParameter(org.eclipse.swt.widgets.Composite composite, java.lang.String configID, java.lang.String labelKey, java.lang.String suffixLabelKey, int[] values, java.lang.String[] displayStrings, SwtParameterValueProcessor<IntListSwtParameter,java.lang.Integer> valueProcessor)
Make UI components for a list of int values
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static int
findIndex(java.lang.Integer value, int[] values)
org.eclipse.swt.widgets.Control[]
getControls()
void
refreshControl()
-
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, validate
-
-
-
-
Constructor Detail
-
IntListSwtParameter
public IntListSwtParameter(org.eclipse.swt.widgets.Composite composite, IntListParameterImpl param)
-
IntListSwtParameter
public IntListSwtParameter(org.eclipse.swt.widgets.Composite composite, java.lang.String configID, java.lang.String labelKey, java.lang.String suffixLabelKey, int[] values, java.lang.String[] displayStrings, SwtParameterValueProcessor<IntListSwtParameter,java.lang.Integer> valueProcessor)
Make UI components for a list of int values 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 boxsuffixLabelKey
- Messagebundle key for text shown after the text boxvalues
- list of values that can be storeddisplayStrings
- fancy words representing each valuevalueProcessor
- null if you want to use COConfigurationManager
-
-
Method Detail
-
refreshControl
public void refreshControl()
- Overrides:
refreshControl
in classBaseSwtParameter<IntListSwtParameter,java.lang.Integer>
-
getControls
public org.eclipse.swt.widgets.Control[] getControls()
- Specified by:
getControls
in interfaceSwtParameter<java.lang.Integer>
- Overrides:
getControls
in classBaseSwtParameter<IntListSwtParameter,java.lang.Integer>
-
findIndex
private static int findIndex(java.lang.Integer value, int[] values)
-
-