Package gui.tools

Examples of gui.tools.PropertiesManager


    languageGroup.add(english);
    c.gridy = 0;
    languagePanel.add(french, c);
    c.gridy = 1;
    languagePanel.add(english, c);
    PropertiesManager genProp = owner.getGeneralPropertiesManager();
    if(genProp.getValue("language").equals("fr"))
      french.setSelected(true);
    else
      english.setSelected(true);
    languagePanel.setBorder(new TitledBorder(propertiesMgr.getValue("languageBorder")));

    //Construct proxy panel.
    proxyType = new JComboBox();
    proxyType.addItem("No Proxy");
    proxyType.addItem("HTTP");
    proxyType.addItem("Socks 4");
    proxyType.addItem("Socks 5");
    proxyType.setSelectedIndex(Integer.parseInt(genProp.getValue("proxyType")));
    proxyHost = new JTextField();
    proxyHost.setText(genProp.getValue("proxyHost"));
    proxyPort = new JTextField();
    proxyPort.setText(genProp.getValue("proxyPort"));

    proxyPanel.setLayout(new GridBagLayout());
    c.gridy = 0;
    proxyPanel.add(proxyType, c);
    c.gridy = 1;
View Full Code Here


    {
      Traces.printTraces("Options recorded.");
      String sel = "en";
      if(french.isSelected())
        sel = "fr";
      PropertiesManager genProp = owner.getGeneralPropertiesManager();
      genProp.setValue("language", sel);
      sel = "" + proxyType.getSelectedIndex();
      genProp.setValue("proxyType", sel);
      sel = proxyHost.getText();
      genProp.setValue("proxyHost", sel);
      sel = proxyPort.getText();
      genProp.setValue("proxyPort", sel);
      genProp.saveProperties("");
      this.dispose();
    }
    else if (source == cancel)
    {
      Traces.printTraces("Options cancelled.");
View Full Code Here

    }
  }

  private ProxyInfo getProxyInfo() throws IllegalArgumentException
  {
    PropertiesManager prop = MainFrame.myRef.getGeneralPropertiesManager();
    int proxyType = Integer.parseInt(prop.getValue("proxyType"));
    String proxyHost = prop.getValue("proxyHost");
    int proxyPort = Integer.parseInt(prop.getValue("proxyPort"));

    switch(proxyType)
    {
      case 1:
        return new ProxyInfo(ProxyInfo.HTTP, proxyHost, proxyPort);
View Full Code Here

   */
  private void initPropertiesMgr()
  {
    try
    {
      genProp = new PropertiesManager("dico/language.properties");
      String ext = genProp.getValue("language");
      langProp = new PropertiesManager("dico/hamsam." + ext);
      Boolean b = new Boolean(genProp.getValue("debug"));
      Traces.setPrintingTraces(b.booleanValue());
    }
    catch(Exception e)
    {
View Full Code Here

TOP

Related Classes of gui.tools.PropertiesManager

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.