Package barrysoft.options

Examples of barrysoft.options.Options


    {
      e.printStackTrace();
      return;
    }
   
    UpdaterView view = new UpdaterViewSwing(new Options());
    final UpdaterController uc = new UpdaterController(Updater.getInstance(), view);

    new Thread(new Runnable()
    {
      @Override
View Full Code Here


  private Configuration configuration;
 
  public Plugin() {
   
    statusShowers = new ArrayList<PluginStatusShower>();
    options = new Options();
    localization = new Localization();
    configuration = new Configuration(XML_ROOT);
   
    getConfiguration().addConfiguration(PluginInfo.XML_ROOT, getInfo());
    getConfiguration().addConfiguration(Options.XML_ROOT, getOptions());
View Full Code Here

  @Test
  public void testOptions() {
   
    Logger.setLogger(new LoggerTextual());
   
    Options options = new Options();
   
    for (int i=0; i < values.length; i++)
      options.setOption("option"+(i+1), values[i]);
   
    checkValues(options);
   
    String xml = options.getXML(0);
   
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
   
    DocumentBuilder db = null;
    try {
      db = dbf.newDocumentBuilder();
    } catch (ParserConfigurationException e1) {
      fail(e1.getMessage());
    }
   
    Document doc = null;
    try {
      doc = db.parse(new InputSource(new StringReader(xml)));
    } catch (SAXException e) {
      fail(e.getMessage());
    } catch (IOException e) {
      fail(e.getMessage());
    }
   
    Options options2 = new Options();
    options2.loadFromXML(doc.getFirstChild());
   
    checkValues(options2);
   
    options2.printOptions();
       
  }
View Full Code Here

TOP

Related Classes of barrysoft.options.Options

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.