|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.preference.FieldEditor
org.eclipse.jface.preference.ListEditor
org.eclipse.cdt.managedbuilder.llvm.ui.preferences.LlvmListEditor
public abstract class LlvmListEditor
An abstract list editor that manages a list of input values. The editor displays a list containing the values, buttons for adding and removing values, and Up and Down buttons to adjust the order of elements in the list.
| Field Summary | |
|---|---|
(package private) org.eclipse.swt.widgets.Button |
addButton
The Add button. |
(package private) org.eclipse.swt.widgets.Composite |
buttonBox
The button box containing the Add, Remove, Up, and Down buttons; null if none (before creation or after disposal). |
(package private) org.eclipse.swt.widgets.Button |
downButton
The Down button. |
(package private) org.eclipse.swt.widgets.List |
list
The list widget; null if none
(before creation or after disposal). |
(package private) org.eclipse.swt.widgets.Button |
removeButton
The Remove button. |
private org.eclipse.swt.events.SelectionListener |
selectionListener
The selection listener. |
(package private) org.eclipse.swt.widgets.Button |
upButton
The Up button. |
| Fields inherited from class org.eclipse.jface.preference.FieldEditor |
|---|
HORIZONTAL_GAP, IS_VALID, VALUE |
| Constructor Summary | |
|---|---|
protected |
LlvmListEditor(java.lang.String name,
java.lang.String labelText,
org.eclipse.swt.widgets.Composite parent)
Creates a list field editor. |
| Method Summary | |
|---|---|
(package private) void |
addPressed()
Notifies that the Add button has been pressed. |
private void |
createButtons(org.eclipse.swt.widgets.Composite box)
Creates the Add, Remove, Up, and Down button in the given button box. |
protected java.lang.String |
createList(java.lang.String[] items)
|
private org.eclipse.swt.widgets.Button |
createPushButton(org.eclipse.swt.widgets.Composite parent,
java.lang.String key)
Helper method to create a push button. |
void |
createSelectionListener()
Creates a selection listener. |
(package private) void |
downPressed()
Notifies that the Down button has been pressed. |
org.eclipse.swt.widgets.Composite |
getButtonBoxControl(org.eclipse.swt.widgets.Composite parent)
Returns this field editor's button box containing the Add, Remove, Up, and Down button. |
org.eclipse.swt.widgets.List |
getListControl(org.eclipse.swt.widgets.Composite parent)
Returns this field editor's list control. |
private org.eclipse.swt.events.SelectionListener |
getSelectionListener()
Returns this field editor's selection listener. |
protected org.eclipse.swt.widgets.Shell |
getShell()
Returns this field editor's shell. |
protected java.lang.String[] |
parseString(java.lang.String stringList)
|
protected abstract void |
removePressed()
Notifies that the Remove button has been pressed. |
protected void |
selectionChanged()
Invoked when the selection in the list has changed. |
private void |
swap(boolean up)
Moves the currently selected item up or down. |
(package private) void |
upPressed()
Notifies that the Up button has been pressed. |
| Methods inherited from class org.eclipse.jface.preference.ListEditor |
|---|
adjustForNumColumns, doFillIntoGrid, doLoad, doLoadDefault, doStore, getAddButton, getDownButton, getList, getNewInputObject, getNumberOfControls, getRemoveButton, getUpButton, setEnabled, setFocus |
| 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, setLabelText, setPage, setPreferenceName, setPreferencePage, setPreferenceStore, setPresentsDefaultValue, setPropertyChangeListener, showErrorMessage, showMessage, store |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
org.eclipse.swt.widgets.List list
null if none
(before creation or after disposal).
org.eclipse.swt.widgets.Composite buttonBox
null if none (before creation or after disposal).
org.eclipse.swt.widgets.Button addButton
org.eclipse.swt.widgets.Button removeButton
org.eclipse.swt.widgets.Button upButton
org.eclipse.swt.widgets.Button downButton
private org.eclipse.swt.events.SelectionListener selectionListener
| Constructor Detail |
|---|
protected LlvmListEditor(java.lang.String name,
java.lang.String labelText,
org.eclipse.swt.widgets.Composite parent)
name - the name of the preference this field editor works onlabelText - the label text of the field editorparent - the parent of the field editor's control| Method Detail |
|---|
protected java.lang.String createList(java.lang.String[] items)
createList in class org.eclipse.jface.preference.ListEditorprotected java.lang.String[] parseString(java.lang.String stringList)
parseString in class org.eclipse.jface.preference.ListEditorprivate void createButtons(org.eclipse.swt.widgets.Composite box)
box - the box for the buttons
private org.eclipse.swt.widgets.Button createPushButton(org.eclipse.swt.widgets.Composite parent,
java.lang.String key)
parent - the parent controlkey - the resource name used to supply the button's label text
public void createSelectionListener()
createSelectionListener in class org.eclipse.jface.preference.ListEditorpublic org.eclipse.swt.widgets.Composite getButtonBoxControl(org.eclipse.swt.widgets.Composite parent)
getButtonBoxControl in class org.eclipse.jface.preference.ListEditorparent - the parent control
public org.eclipse.swt.widgets.List getListControl(org.eclipse.swt.widgets.Composite parent)
getListControl in class org.eclipse.jface.preference.ListEditorparent - the parent control
private org.eclipse.swt.events.SelectionListener getSelectionListener()
protected void selectionChanged()
The default implementation of this method utilizes the selection index and the size of the list to toggle the enablement of the up, down and remove buttons.
selectionChanged in class org.eclipse.jface.preference.ListEditorprivate void swap(boolean up)
up - true if the item should move up,
and false if it should move downprotected org.eclipse.swt.widgets.Shell getShell()
This method is internal to the framework; subclasses should not call this method.
getShell in class org.eclipse.jface.preference.ListEditorvoid addPressed()
protected abstract void removePressed()
void upPressed()
void downPressed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||