Package nu.fw.jeti.plugins

Examples of nu.fw.jeti.plugins.PreferencesPanel


    jPanel2.add(btnApply);
   
    pluginPanel = new PluginsPanel(this);
    panels.put(I18N.gettext("main.options.Plugins"), pluginPanel);
    cards.add(pluginPanel, I18N.gettext("main.options.Plugins"));
    PreferencesPanel panel = null;
    node.add(new DefaultMutableTreeNode(I18N.gettext("main.options.Plugins")));

    panel = new StdPreferencesPanel(backend);
    panels.put(I18N.gettext("main.options.Standard"), panel);
    cards.add(panel, I18N.gettext("main.options.Standard"));
    node.add(new DefaultMutableTreeNode(I18N.gettext("main.options.Standard")));
   
    //if (new File(Start.path + "plugins" + File.separator + "rostericons").exists())
    {
      panel = new IconPrefPanel("rostericons");
      panels.put(I18N.gettext("main.options.RosterIcons"), panel);
      cards.add(panel, I18N.gettext("main.options.RosterIcons"));
      node.add(new DefaultMutableTreeNode(I18N.gettext("main.options.RosterIcons")));
    }

   
    for (Iterator i = PluginsInfo.loadedPreferencePanels.entrySet().iterator(); i.hasNext();)
    {
      Map.Entry temp = (Map.Entry) i.next();
      try
      {
        Class c = (Class) temp.getValue();
        Constructor co = c.getConstructor(new Class[] { Backend.class });
        panel = (PreferencesPanel) co.newInstance(new Object[] { backend });
      }
      catch (Exception e2)
      {
        e2.printStackTrace();
        break;
      }
            if (!panel.inhibited()) {
                String name = (String) temp.getKey();
                panels.put(name, panel);
                cards.add(panel, name);
                DefaultMutableTreeNode mnode= new DefaultMutableTreeNode(name);
                nodes.put(name, mnode);
View Full Code Here


    }
  }

  public void addPanel(String name)
  {
    PreferencesPanel panel = null;
    try
    {
      Class c = (Class) PluginsInfo.loadedPreferencePanels.get(name);
      Constructor co = c.getConstructor(new Class[] { Backend.class });
      panel = (PreferencesPanel) co.newInstance(new Object[] { backend });
    }
    catch (Exception e2)
    {
      //System.err.println("no preferences panel");
      return;
    }
        if (!panel.inhibited()) {
            panels.put(name, panel);
            cards.add(panel, name);
            DefaultTreeModel model = (DefaultTreeModel)tree.getModel();
            DefaultMutableTreeNode mnode= new DefaultMutableTreeNode(name);
            nodes.put(name, mnode);
View Full Code Here

  public void savePreferences()
  {
    for (Iterator i = panels.values().iterator(); i.hasNext();)
    {
      PreferencesPanel pp = (PreferencesPanel) i.next();
      if(pp!=pluginPanel) pp.savePreferences();
    }
    pluginPanel.savePreferences();
    if(Start.applet)backend.send(new InfoQuery("set",new IQPrivate(new nu.fw.jeti.applet.JetiPrivatePreferencesExtension(new Preferences()))));
    else Preferences.save();
  }
View Full Code Here

TOP

Related Classes of nu.fw.jeti.plugins.PreferencesPanel

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.