Class StringTableFieldEditor
java.lang.Object
org.eclipse.jface.preference.FieldEditor
org.csstudio.opibuilder.preferences.StringTableFieldEditor
Field Editor for String table (a 2D String Array) input.
-
Field Summary
Fields inherited from class org.eclipse.jface.preference.FieldEditor
HORIZONTAL_GAP, IS_VALID, VALUE
-
Constructor Summary
ModifierConstructorDescriptionprotected
StringTableFieldEditor
(String name, String labelText, Composite parent, String[] headers, boolean[] editable, RowEditDialog rowEditDialog, int[] columnsMinWidth) Creates an editable table. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
adjustForNumColumns
(int numColumns) decodeStringTable
(String flattedString) protected void
doFillIntoGrid
(Composite parent, int numColumns) protected void
doLoad()
protected void
protected void
doStore()
static String
flattenStringTable
(List<String[]> stringTable) Flatten a string table to a single line string.int
Methods inherited from class org.eclipse.jface.preference.FieldEditor
applyFont, checkParent, clearErrorMessage, clearMessage, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, createControl, dispose, fillIntoGrid, fireStateChanged, fireValueChanged, getFieldEditorFontName, getLabelControl, getLabelControl, getLabelText, getPage, getPreferenceName, getPreferencePage, getPreferenceStore, init, isValid, load, loadDefault, presentsDefaultValue, refreshValidState, setButtonLayoutData, setEnabled, setFocus, setLabelText, setPage, setPreferenceName, setPreferencePage, setPreferenceStore, setPresentsDefaultValue, setPropertyChangeListener, showErrorMessage, showMessage, store
-
Field Details
-
tableEditor
-
items
-
-
Constructor Details
-
StringTableFieldEditor
protected StringTableFieldEditor() -
StringTableFieldEditor
public StringTableFieldEditor(String name, String labelText, Composite parent, String[] headers, boolean[] editable, RowEditDialog rowEditDialog, int[] columnsMinWidth) Creates an editable table. The size of headers array implies the number of columns.- Parameters:
parent
- The composite which the table resides inheaders
- Contains the header for each columneditable
- Whether it is editable for each column. The size must be same as headers.
-
-
Method Details
-
adjustForNumColumns
protected void adjustForNumColumns(int numColumns) - Specified by:
adjustForNumColumns
in classFieldEditor
-
doFillIntoGrid
- Specified by:
doFillIntoGrid
in classFieldEditor
-
doLoad
protected void doLoad()- Specified by:
doLoad
in classFieldEditor
-
doLoadDefault
protected void doLoadDefault()- Specified by:
doLoadDefault
in classFieldEditor
-
doStore
protected void doStore()- Specified by:
doStore
in classFieldEditor
-
getNumberOfControls
public int getNumberOfControls()- Specified by:
getNumberOfControls
in classFieldEditor
-
flattenStringTable
Flatten a string table to a single line string.- Parameters:
stringTable
-- Returns:
-
decodeStringTable
- Throws:
Exception
-