|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.ui.util.ComboHistoryHandler
public class ComboHistoryHandler
This class can be used to manage the items in a combo box as a history. The
history has a certain size. New items are added to the top, while keeping
the history at the given size. Existing items are just moved to the top.
The combo history manager provides ways to load and restore the combo box's
settings using a DialogSettings
instance.
Constructor Summary | |
---|---|
ComboHistoryHandler(Combo combo,
int historySize)
Constructs a new instance for the given combo box with the given history size. |
Method Summary | |
---|---|
void |
recordAndDisplay(String item)
Adds the given item to the history and sets it as the combo box's text. |
void |
restoreHistory(IDialogSettings settings,
String key)
Loads the history from the given dialog settings. |
void |
saveHistory(IDialogSettings settings,
String key)
Saves the history in the given dialog settings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComboHistoryHandler(Combo combo, int historySize)
combo
- the combo box whose history to manage.historySize
- size of the history.Method Detail |
---|
public void recordAndDisplay(String item)
null
items are ignored history-wise, but set as the combo
box's new text.
item
- the item to add.public void saveHistory(IDialogSettings settings, String key)
settings
- the settings to store the history in.key
- the key to use.public void restoreHistory(IDialogSettings settings, String key)
settings
- the settings to load the history from.key
- the key to use.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |