Package com.biglybt.ui.swt.config
Class FileSwtParameter
java.lang.Object
com.biglybt.ui.swt.config.BaseSwtParameter<FileSwtParameter,String>
com.biglybt.ui.swt.config.BaseSwtStringParameter<FileSwtParameter>
com.biglybt.ui.swt.config.FileSwtParameter
- All Implemented Interfaces:
SwtParameter<String>
SWT Parameter representing a File (String) value.
Displays Textbox and browse button.
Will always use 2 horizontal spaces in GridLayout
Note: Currently doesn't validate if file is valid or exists. This allows
for URL entries.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.biglybt.ui.swt.config.BaseSwtParameter
BaseSwtParameter.IndentPaintListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.eclipse.swt.widgets.Composite
private final org.eclipse.swt.widgets.Button
protected String[]
private String
protected String
Fields inherited from class com.biglybt.ui.swt.config.BaseSwtStringParameter
inputField
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
ConstructorsConstructorDescriptionFileSwtParameter
(org.eclipse.swt.widgets.Composite parent, FileParameterImpl param) FileSwtParameter
(org.eclipse.swt.widgets.Composite composite, String paramID, String labelKey, String[] extension_list, SwtParameterValueProcessor<FileSwtParameter, String> valueProcessor) Make a File selecting ui -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addLabelContextMenus
(org.eclipse.swt.widgets.Control curControl, org.eclipse.swt.widgets.Menu menu) org.eclipse.swt.widgets.Control[]
private String
openDialog
(org.eclipse.swt.widgets.Shell shell, String old_value) void
setFilenameHint
(String filenameHint) Methods inherited from class com.biglybt.ui.swt.config.BaseSwtStringParameter
refreshControl, setHintKey, setTextLimit, setValidChars, setWidthInCharacters
Methods inherited from class com.biglybt.ui.swt.config.BaseSwtParameter
addAndFireChangeListener, addChangeListener, 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
-
Field Details
-
browse
private final org.eclipse.swt.widgets.Button browse -
area
private final org.eclipse.swt.widgets.Composite area -
keyDialogTitle
-
extension_list
-
filenameHint
-
-
Constructor Details
-
FileSwtParameter
-
FileSwtParameter
public FileSwtParameter(org.eclipse.swt.widgets.Composite composite, String paramID, String labelKey, String[] extension_list, SwtParameterValueProcessor<FileSwtParameter, String> valueProcessor) Make a File selecting ui When parent 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 the color buttonvalueProcessor
- null if you want to use COConfigurationManager
-
-
Method Details
-
addLabelContextMenus
protected void addLabelContextMenus(org.eclipse.swt.widgets.Control curControl, org.eclipse.swt.widgets.Menu menu) - Overrides:
addLabelContextMenus
in classBaseSwtParameter<FileSwtParameter,
String>
-
getControls
public org.eclipse.swt.widgets.Control[] getControls()- Specified by:
getControls
in interfaceSwtParameter<String>
- Overrides:
getControls
in classBaseSwtStringParameter<FileSwtParameter>
-
setFilenameHint
-
openDialog
-