static void applyStoredDisplaySettings(Stage stage, String name){
        try {
            if( PREFERENCES.nodeExists(name) ){
                Preferences stagePreferences = PREFERENCES.node(name);
                boolean wasMaximized = stagePreferences.getBoolean(WINDOW_MAXIMIZED, false);
                if( wasMaximized ){
                    stage.setMaximized(true);
                } else {
                    stage.setX( stagePreferences.getDouble(WINDOW_X_POS, DEFUALT_X));
                    stage.setY( stagePreferences.getDouble(WINDOW_Y_POS, DEFUALT_Y));
                    stage.setWidth( stagePreferences.getDouble(WINDOW_WIDTH,  DEFUALT_WIDTH));
                    stage.setHeight(stagePreferences.getDouble(WINDOW_HEIGHT, DEFUALT_HEIHGT));
                }                
            }
        } catch (BackingStoreException ex) {
            LOGGER.error(ex, "Could not access preferences for window " + name);
        }
    }
Retrieves data about he window settings from the previous session and applies 
them to the stage. These settings include window size, position and if
it was maximized or not.

@param stage  the stage to apply these settings to
@param name   the name under which we stored the settings
tool-parent/tool-core/src/main/java/com/speedment/tool/core/internal/util/WindowSettingUtil.java