Package org.jboss.errai.workspaces.client.framework

Examples of org.jboss.errai.workspaces.client.framework.Preferences


            }

            // init by preferences
            if(null==initialToolSet)
            {
              Preferences prefs = GWT.create(Preferences.class);
              String preferedTool = prefs.has(Preferences.DEFAULT_TOOL) ?
                  Workspace.encode(prefs.get(Preferences.DEFAULT_TOOL)) : null;

              if(preferedTool!=null && workspace.hasToolSet(preferedTool))
              {
                initialToolSet = preferedTool;
              }
View Full Code Here


    final ListBox multiBox = new ListBox();
    multiBox.setVisibleItemCount(5);
    layout.add(multiBox);

    // init
    final Preferences prefs = GWT.create(Preferences.class);
    String prefEditor = prefs.get(Preferences.DEFAULT_TOOL);
    for(ToolSet ts : toolsets)
    {
      multiBox.addItem(ts.getToolSetName());
      if(ts.getToolSetName().equals(prefEditor))
        multiBox.setItemSelected(multiBox.getItemCount()-1, true);
    }

    multiBox.addClickHandler(
        new ClickHandler()
        {
          public void onClick(ClickEvent clickEvent)
          {
            String title = multiBox.getItemText(multiBox.getSelectedIndex());
            for(ToolSet ts: toolsets)
            {
              if(ts.getToolSetName().equals(title))
              {
                prefs.set(Preferences.DEFAULT_TOOL, ts.getToolSetName());
              }
            }
          }
        }
    );
View Full Code Here

            }

            // init by preferences
            if(null==initialToolSet)
            {
              Preferences prefs = GWT.create(Preferences.class);
              String preferedTool = prefs.has(Preferences.DEFAULT_TOOL) ?
                  Workspace.encode(prefs.get(Preferences.DEFAULT_TOOL)) : null;

              if(preferedTool!=null && workspace.hasToolSet(preferedTool))
              {
                initialToolSet = preferedTool;
              }
View Full Code Here

TOP

Related Classes of org.jboss.errai.workspaces.client.framework.Preferences

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.