Search in sources :

Example 6 with JsSetting

use of org.pentaho.mantle.client.usersettings.JsSetting in project pentaho-platform by pentaho.

the class SolutionTree method onUserSettingsLoaded.

@Override
public void onUserSettingsLoaded(UserSettingsLoadedEvent event) {
    JsArray<JsSetting> settings = event.getSettings();
    if (settings != null) {
        for (int i = 0; i < settings.length(); i++) {
            JsSetting setting = settings.get(i);
            if (IMantleUserSettingsConstants.MANTLE_SHOW_LOCALIZED_FILENAMES.equals(setting.getName())) {
                // $NON-NLS-1$
                boolean showLocalizedFileNames = "true".equals(setting.getName());
                setShowLocalizedFileNames(showLocalizedFileNames);
            } else if (IMantleUserSettingsConstants.MANTLE_SHOW_DESCRIPTIONS_FOR_TOOLTIPS.equals(setting.getName())) {
                // $NON-NLS-1$
                boolean useDescriptions = "true".equals(setting.getValue());
                setUseDescriptionsForTooltip(useDescriptions);
            } else if (IMantleUserSettingsConstants.MANTLE_SHOW_HIDDEN_FILES.equals(setting.getName())) {
                // $NON-NLS-1$
                boolean showHiddenFiles = "true".equals(setting.getValue());
                setShowHiddenFiles(showHiddenFiles);
            }
        }
    }
    RepositoryFileTreeManager.getInstance().addRepositoryFileTreeListener(this, null, null, showHiddenFiles);
}
Also used : JsSetting(org.pentaho.mantle.client.usersettings.JsSetting)

Aggregations

JsSetting (org.pentaho.mantle.client.usersettings.JsSetting)6 JsArray (com.google.gwt.core.client.JsArray)3 RequestException (com.google.gwt.http.client.RequestException)3 Request (com.google.gwt.http.client.Request)2 RequestBuilder (com.google.gwt.http.client.RequestBuilder)2 RequestCallback (com.google.gwt.http.client.RequestCallback)2 Response (com.google.gwt.http.client.Response)2 PentahoMenuItem (org.pentaho.gwt.widgets.client.menuitem.PentahoMenuItem)2 UserSettingsLoadedEvent (org.pentaho.mantle.client.events.UserSettingsLoadedEvent)2 JSONArray (com.google.gwt.json.client.JSONArray)1 MenuBar (com.google.gwt.user.client.ui.MenuBar)1 MenuItem (com.google.gwt.user.client.ui.MenuItem)1 MessageDialogBox (org.pentaho.gwt.widgets.client.dialogs.MessageDialogBox)1 StringTokenizer (org.pentaho.gwt.widgets.client.utils.string.StringTokenizer)1 LoginCommand (org.pentaho.mantle.client.commands.LoginCommand)1 SwitchLocaleCommand (org.pentaho.mantle.client.commands.SwitchLocaleCommand)1 SwitchThemeCommand (org.pentaho.mantle.client.commands.SwitchThemeCommand)1 PerspectivesLoadedEvent (org.pentaho.mantle.client.events.PerspectivesLoadedEvent)1 PerspectivesLoadedEventHandler (org.pentaho.mantle.client.events.PerspectivesLoadedEventHandler)1 UserSettingsLoadedEventHandler (org.pentaho.mantle.client.events.UserSettingsLoadedEventHandler)1