Example usage for org.eclipse.jface.preference IPreferenceStore isDefault

List of usage examples for org.eclipse.jface.preference IPreferenceStore isDefault

Introduction

In this page you can find the example usage for org.eclipse.jface.preference IPreferenceStore isDefault.

Prototype

boolean isDefault(String name);

Source Link

Document

Returns whether the current value of the preference with the given name has the default value.

Usage

From source file:uk.ac.diamond.scisoft.analysis.rcp.views.ImageExplorerView.java

License:Open Source License

/**
 * @return thumbnail size/*ww w.j  av a  2  s. c o  m*/
 */
private int getPreferenceImageSize() {
    IPreferenceStore preferenceStore = AnalysisRCPActivator.getDefault().getPreferenceStore();
    int size = preferenceStore.isDefault(PreferenceConstants.IMAGEEXPLORER_IMAGESIZE)
            ? preferenceStore.getDefaultInt(PreferenceConstants.IMAGEEXPLORER_IMAGESIZE)
            : preferenceStore.getInt(PreferenceConstants.IMAGEEXPLORER_IMAGESIZE);
    return size;
}