|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.dialogs.FilteredItemsSelectionDialog.SelectionHistory
History stores a list of key, object pairs. The list is bounded at a
certain size. If the list exceeds this size the oldest element is removed
from the list. An element can be added/renewed with a call to
accessed(Object)
.
The history can be stored to/loaded from an XML file.
Constructor Summary | |
---|---|
FilteredItemsSelectionDialog.SelectionHistory()
Creates new instance of SelectionHistory . |
Method Summary | |
---|---|
void |
accessed(Object object)
Adds object to history. |
boolean |
contains(Object object)
Returns true if history contains object. |
Object[] |
getHistoryItems()
Gets array of history items. |
boolean |
isEmpty()
Returns true if history is empty. |
void |
load(IMemento memento)
Load history elements from memento. |
boolean |
remove(Object element)
Remove element from history. |
protected abstract Object |
restoreItemFromMemento(IMemento memento)
Creates an object using given memento. |
void |
save(IMemento memento)
Save history elements to memento. |
protected abstract void |
storeItemToMemento(Object item,
IMemento memento)
Store object in IMemento . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FilteredItemsSelectionDialog.SelectionHistory()
SelectionHistory
.
Method Detail |
public void accessed(Object object)
object
- the item to be added to the historypublic boolean contains(Object object)
true
if history contains object.
object
- the item for which check will be executed
true
if history contains object
false
in other waypublic boolean isEmpty()
true
if history is empty.
true
if history is emptypublic boolean remove(Object element)
element
- to remove form the history
true
if this list contained the specified
elementpublic void load(IMemento memento)
memento
- memento from which the history will be retrievedpublic void save(IMemento memento)
memento
- memento to which the history will be addedpublic Object[] getHistoryItems()
protected abstract Object restoreItemFromMemento(IMemento memento)
memento
- memento used for creating new object
protected abstract void storeItemToMemento(Object item, IMemento memento)
IMemento
.
item
- the item to storememento
- the memento to store to
|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.