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

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

Introduction

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

Prototype

float FLOAT_DEFAULT_DEFAULT

To view the source code for org.eclipse.jface.preference IPreferenceStore FLOAT_DEFAULT_DEFAULT.

Click Source Link

Document

The default-default value for float preferences (0.0f).

Usage

From source file:com.github.jennybrown8.wicketsourceopener.preferences.SecurePreferenceStore.java

License:GNU General Public License

@Override
public float getDefaultFloat(String name) {
    if (defaultProperties.containsKey(name)) {
        Float value;//w  w  w .  java2s . c  o m
        try {
            value = Float.parseFloat(defaultProperties.getProperty(name));
        } catch (NumberFormatException e) {
            return IPreferenceStore.FLOAT_DEFAULT_DEFAULT;
        }
        return value.floatValue();
    } else {
        return IPreferenceStore.FLOAT_DEFAULT_DEFAULT;
    }
}

From source file:com.github.jennybrown8.wicketsourceopener.preferences.SecurePreferenceStore.java

License:GNU General Public License

@Override
public float getFloat(String name) {
    try {/*w  w w  .j  a va2 s .  com*/
        return securePreferences.getFloat(name, IPreferenceStore.FLOAT_DEFAULT_DEFAULT);
    } catch (StorageException e) {
        exceptionHandler.handle(e);
    }
    return IPreferenceStore.FLOAT_DEFAULT_DEFAULT;

}