Class DialogSettingsBasedHistory
- java.lang.Object
-
- com._1c.g5.v8.dt.common.ui.jface.viewers.DialogSettingsBasedHistory
-
public class DialogSettingsBasedHistory extends Object
History ofString
entries, based onIDialogSettings
.History may be used to store and load
String
elements (or some elements encoded toString
) in dialog settings. History size is10
by default, but may be configured.- See Also:
IDialogSettings
-
-
Constructor Summary
Constructors Constructor Description DialogSettingsBasedHistory(org.eclipse.jface.dialogs.IDialogSettings dialogSettings)
Constructor ofDialogSettingsBasedHistory
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHistoryEntry(String entry)
Add newString
entry to the history.List<String>
loadHistory()
Load and return condition history from the dialog settings.void
saveHistory(List<String> history)
Save entire history list to the dialog settings.void
setHistorySize(int historySize)
Set maximum history size.
-
-
-
Constructor Detail
-
DialogSettingsBasedHistory
public DialogSettingsBasedHistory(org.eclipse.jface.dialogs.IDialogSettings dialogSettings)
Constructor ofDialogSettingsBasedHistory
.- Parameters:
dialogSettings
- the dialog settings to use for entry save and load, cannot benull
-
-
Method Detail
-
setHistorySize
public void setHistorySize(int historySize)
Set maximum history size. Default value is10
.- Parameters:
historySize
- the maximum history size, must be positive
-
addHistoryEntry
public void addHistoryEntry(String entry)
Add newString
entry to the history. History will be saved in dialog settings. If history size reached its maximum, least recent entry will be removed.- Parameters:
entry
- a newString
entry to add to history, cannot benull
-
saveHistory
public void saveHistory(List<String> history)
Save entire history list to the dialog settings.- Parameters:
history
- the history list to save, cannot benull
-
-