public class JSR270HistoryManager extends Object implements HistoryManager
| Constructor and Description |
|---|
JSR270HistoryManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntry(String newEntry)
Add a line or a block in history
|
void |
display()
Display all history entries with line numbers
|
String |
getEntry(int entryIndex)
Gets an entry in the history by giving its number
|
String |
getNextEntry(String beg)
Gets next entry in the history by giving its beginning
|
String |
getPreviousEntry(String beg)
Gets previous entry in the history by giving its beginning
|
String |
getTmpEntry()
Gets the currently edited command line before erasing it
|
boolean |
isInHistory()
Are we browsing history ?
|
void |
load()
Load history from a file
|
void |
reset()
Clears the history
|
void |
save()
Save history to a file
|
void |
setInHistory(boolean status)
Sets the flag indicating if we are browsing history
|
void |
setMaxEntryNumber(int numberOfEntries)
Set the maximum number of entries (lines/blocks) allowed in the history
|
void |
setTmpEntry(String currentCommandLine)
Saves the currently edited command line before erasing it
|
public void addEntry(String newEntry)
HistoryManageraddEntry in interface HistoryManagernewEntry - the entry to be added at the end of the historypublic void display()
HistoryManagerdisplay in interface HistoryManagerpublic String getEntry(int entryIndex)
HistoryManagergetEntry in interface HistoryManagerentryIndex - the index of the entry in the historypublic String getNextEntry(String beg)
HistoryManagergetNextEntry in interface HistoryManagerbeg - the beginning of the entry (can be empty)public String getPreviousEntry(String beg)
HistoryManagergetPreviousEntry in interface HistoryManagerbeg - the beginning of the entry (can be empty)public String getTmpEntry()
HistoryManagergetTmpEntry in interface HistoryManagerpublic boolean isInHistory()
HistoryManagerisInHistory in interface HistoryManagerpublic void load()
HistoryManagerload in interface HistoryManagerpublic void reset()
HistoryManagerreset in interface HistoryManagerpublic void save()
HistoryManagersave in interface HistoryManagerpublic void setInHistory(boolean status)
HistoryManagersetInHistory in interface HistoryManagerstatus - is true if we begin to browse the history, false if we stop browsingpublic void setMaxEntryNumber(int numberOfEntries)
HistoryManagersetMaxEntryNumber in interface HistoryManagernumberOfEntries - the number of entries to setpublic void setTmpEntry(String currentCommandLine)
HistoryManagersetTmpEntry in interface HistoryManagercurrentCommandLine - the text currently edited by the userCopyright © 2007-2013 Artenum. All Rights Reserved.