protected abstract static class CdmFilteredItemsSelectionDialog.SelectionHistory
extends java.lang.Object
accessed(Object)
.
The history can be stored to/loaded from an XML file.
Constructor and Description |
---|
SelectionHistory()
Creates new instance of
SelectionHistory . |
Modifier and Type | Method and Description |
---|---|
void |
accessed(java.lang.Object object)
Adds object to history.
|
boolean |
contains(java.lang.Object object)
Returns
true if history contains object. |
java.lang.Object[] |
getHistoryItems()
Gets array of history items.
|
boolean |
isEmpty()
Returns
true if history is empty. |
void |
load(org.eclipse.ui.IMemento memento)
Load history elements from memento.
|
boolean |
remove(java.lang.Object element)
Remove element from history.
|
protected abstract java.lang.Object |
restoreItemFromMemento(org.eclipse.ui.IMemento memento)
Creates an object using given memento.
|
void |
save(org.eclipse.ui.IMemento memento)
Save history elements to memento.
|
protected abstract void |
storeItemToMemento(java.lang.Object item,
org.eclipse.ui.IMemento memento)
Store object in
IMemento . |
public SelectionHistory()
SelectionHistory
.public void accessed(java.lang.Object object)
object
- the item to be added to the historypublic boolean contains(java.lang.Object object)
true
if history contains object.object
- the item for which check will be executedtrue
if history contains object
false
in other waypublic boolean isEmpty()
true
if history is empty.true
if history is emptypublic boolean remove(java.lang.Object element)
element
- to remove form the historytrue
if this list contained the specified
elementpublic void load(org.eclipse.ui.IMemento memento)
memento
- memento from which the history will be retrievedpublic void save(org.eclipse.ui.IMemento memento)
memento
- memento to which the history will be addedpublic java.lang.Object[] getHistoryItems()
protected abstract java.lang.Object restoreItemFromMemento(org.eclipse.ui.IMemento memento)
memento
- memento used for creating new objectprotected abstract void storeItemToMemento(java.lang.Object item, org.eclipse.ui.IMemento memento)
IMemento
.item
- the item to storememento
- the memento to store toCopyright © 2007-2018. All Rights Reserved.