Example usage for com.google.gwt.storage.client StorageEvent getStorageArea

List of usage examples for com.google.gwt.storage.client StorageEvent getStorageArea

Introduction

In this page you can find the example usage for com.google.gwt.storage.client StorageEvent getStorageArea.

Prototype

public Storage getStorageArea() 

Source Link

Document

Returns the Storage object that was affected.

Usage

From source file:org.jboss.as.console.client.search.Index.java

License:Open Source License

@Override
public void onStorageChange(final StorageEvent event) {
    boolean deletedFromLocalStorage = event.getStorageArea() == localStorage && event.getNewValue() == null
            && event.getOldValue() == null;
    if (deletedFromLocalStorage && event.getKey().equals(indexKey()) && !isEmpty()) {
        // the index was removed from the local storage by some external code - let's start from scratch.
        reset();/*from www.ja v  a 2  s  .co m*/
    }
}