Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.dialogs
Class FilteredItemsSelectionDialog.SelectionHistory


java.lang.Object
  extended by 
org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.SelectionHistory
Enclosing class:
FilteredItemsSelectionDialog

protected abstract static class FilteredItemsSelectionDialog.SelectionHistory
extends Object

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

FilteredItemsSelectionDialog.SelectionHistory

public FilteredItemsSelectionDialog.SelectionHistory()
Creates new instance of SelectionHistory.

Method Detail

accessed

public void accessed(
Object object)
Adds object to history.

Parameters:
object - the item to be added to the history

contains

public boolean contains(
Object object)
Returns true if history contains object.

Parameters:
object - the item for which check will be executed
Returns:
true if history contains object false in other way

isEmpty

public boolean isEmpty()
Returns true if history is empty.

Returns:
true if history is empty

remove

public boolean remove(
Object element)
Remove element from history.

Parameters:
element - to remove form the history
Returns:
true if this list contained the specified element

load

public void load(
IMemento memento)
Load history elements from memento.

Parameters:
memento - memento from which the history will be retrieved

save

public void save(
IMemento memento)
Save history elements to memento.

Parameters:
memento - memento to which the history will be added

getHistoryItems

public 
Object[] getHistoryItems()
Gets array of history items.

Returns:
array of history elements

restoreItemFromMemento

protected abstract 
Object restoreItemFromMemento(
IMemento memento)
Creates an object using given memento.

Parameters:
memento - memento used for creating new object
Returns:
the restored object

storeItemToMemento

protected abstract void storeItemToMemento(
Object item,
                                           
IMemento memento)
Store object in IMemento.

Parameters:
item - the item to store
memento - the memento to store to

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire