|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.csstudio.ui.util.helpers.ComboHistoryHelper
public abstract class ComboHistoryHelper
Decorates a Combo box to maintain the history.
Newly entered items are added to the top of the combo list, dropping last items off the list when reaching a configurable maximum list size. If an item is selected/entered again, it will pop at the beginning of the list (so that continuously used items are not lost).
You must
newSelection(String)| Constructor Summary | |
|---|---|
ComboHistoryHelper(IDialogSettings settings,
java.lang.String tag,
Combo combo)
Attach helper to given combo box, using max list length. |
|
ComboHistoryHelper(IDialogSettings settings,
java.lang.String tag,
Combo combo,
int max,
boolean saveOnDispose)
Attach helper to given combo box, using max list length. |
|
| Method Summary | |
|---|---|
void |
addEntry(java.lang.String newEntry)
Adds a new entry to the list. |
void |
changeSelection(java.lang.String entry)
|
void |
loadSettings()
Load persisted list values. |
abstract void |
newSelection(java.lang.String entry)
Invoked whenever a new entry was entered or selected. |
void |
saveSettings()
Save list values to persistent storage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ComboHistoryHelper(IDialogSettings settings,
java.lang.String tag,
Combo combo)
settings - where to persist the combo box listtag - tag used for persistencecombo - the combo box
public ComboHistoryHelper(IDialogSettings settings,
java.lang.String tag,
Combo combo,
int max,
boolean saveOnDispose)
settings - where to persist the combo box listtag - tag used for persistencecombo - the combo boxmax - number of elements to keep in historysaveOnDispose - whether current values should be saved at widget disposal| Method Detail |
|---|
public void changeSelection(java.lang.String entry)
public void addEntry(java.lang.String newEntry)
newEntry - the new valuepublic abstract void newSelection(java.lang.String entry)
public void loadSettings()
public void saveSettings()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||