Examples of IExtension


Examples of de.yaams.maker.helper.extensions.IExtension

    projects = new XMLHelper<ArrayList<BasisListElement>>().loadXML(new File(YAamsCore.programPath, "projects.xml"));
    types = new HashMap<String, ProjectType>();
    empty = new EmptyProjectType();

    // add save
    ExtentionManagement.add(ExtentionManagement.SAVE, new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        save();

      }
    });

    // found nothing?
    if (projects == null) {
      projects = new ArrayList<BasisListElement>();
    } else {
      // for (BasisListElement p : projects) {
      // ((Project) p).load();
      // }
    }

    // add options
    ExtentionManagement.add(Project.EXLOAD, new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        Project p = (Project) objects.get("project");

        // exist options?
        if (p.getType() != ProjectManagement.getType("empty") && !p.getObjects().containsKey(ProjectOptionManager.ID)) {
          p.addObjManager(new ProjectOptionManager(), ProjectOptionManager.ID);

        }
      }
    });

    // crypt projects
    ExtentionManagement.add("close", new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        for (BasisListElement p : projects) {
          ((Project) p).closeIt();
View Full Code Here

Examples of de.yaams.maker.helper.extensions.IExtension

    // run over all plugins again
    // PluginManager.start(mess);

    // install options
    ExtentionManagement.add(OptionsTab.EXSYS, new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        FormBuilder f = (FormBuilder) objects.get("form");

        // add it
        f.addHeader("plugins", new FormHeader(I18N.t("Plugins"), "plugin").setColumn(4));
        f.addElement("plugins.inet", YSettingHelper.bool(null, I18N.t("Internetzugriff aktivieren"), "net.access", true));
        f.addElement(AUTO, YSettingHelper.bool(null, I18N.t("Autom. Installation von Plugins"), AUTO, true));
        f.addElement(CHECK, YSettingHelper.combo(null, I18N.t("Updatecheck"), CHECK, "168", new String[] { "0", "24", "168", "714",
            "-1" }, new String[] { "Bei jedem Start", "Täglich", "Wöchentlich", "Monatlich", "Manuelle Prüfung" }));
      }
    });

    // install page
    ExtentionManagement.add(OptionsTab.EXADD, new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {

        ArrayList<BasisListElement> ary = (ArrayList<BasisListElement>) objects.get("list");
View Full Code Here

Examples of de.yaams.maker.helper.extensions.IExtension

   * Init
   */
  public static void addOptions() {

    // add save
    ExtentionManagement.add(ExtentionManagement.SAVE, new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {

        Setting.set("lang.default", locale.toString());

      }
    });

    // add gui

    // add setting
    ExtentionManagement.add("form.options.info", new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        FormBuilder form = (FormBuilder) objects.get("form");
        form.addElement("basic.lang", new FormInfo(T.r("lang"), locale.getDisplayName()));

      }
    });

    // add setting
    ExtentionManagement.add("form.options.system", new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {

        // add it
View Full Code Here

Examples of de.yaams.maker.helper.extensions.IExtension

  /**
   *
   */
  public static void init(YMessagesDialog ymd) {
    // save settings
    ExtentionManagement.add(ExtentionManagement.SAVE, new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        FileHelper.saveXML(new File(folder, "setting.xml"), plugins);

View Full Code Here

Examples of de.yaams.maker.helper.extensions.IExtension

    if (lastTabs.size() == 0) {
      lastTabs.add(BasicTabEvent.HOME);
    }

    // add save
    ExtentionManagement.add(ExtentionManagement.SAVE, new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {

        saveOpenTabs();
        // save favs
        FileHelper.saveXML(new File(YAamsCore.programPath, "favorit.xml"), favorit);

      }
    });

    // install page
    ExtentionManagement.add(OptionsTab.EXADD, new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {

        ArrayList<BasisListElement> ary = (ArrayList<BasisListElement>) objects.get("list");
View Full Code Here

Examples of de.yaams.maker.helper.extensions.IExtension

  public void start() {
    // add plugin
    IconCache.addPNG(JRubyPlugin.class, "ruby");

    // add credits
    ExtentionManagement.add(OptionsTab.OPTIONS_INFO, new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        FormBuilder f = (FormBuilder) objects.get("form");
        f.addElement("thx.jruby", new FormLink("JRuby", "http://www.jruby.org"));
View Full Code Here

Examples of de.yaams.maker.helper.extensions.IExtension

    // set look and feel
    final String skin = Setting.get("substance", "0");

    if (skin != null && !skin.equals("0")) {
      ExtentionManagement.add("yaframe.start.finish", new IExtension() {

        @Override
        public void work(HashMap<String, Object> objects) {
          setWindowLook(Setting.get("substance.decoration", true));
          setSkin(skin);

        }
      });

    }

    // add setting
    ExtentionManagement.add("form.options.system", new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        FormBuilder f = (FormBuilder) objects.get("form");

        // add it
        f.addHeader("substance", new FormHeader(I18N.t("Look and Feel"), "substance").setColumn(4));

        FormComboBox c = YSettingHelper.combo(null, I18N.t("Look"), "substance", "0", className, classTitle);

        c.selectField(Setting.get("substance", "0"));
        c.addChangeListener(new FormElementChangeListener() {

          @Override
          public void stateChanged(FormElement form) {
            String skin = form.getContentAsString();
            YAamsCore.save();

            setSkin(skin);
          }
        });
        c.getBox().setRenderer(new SubstanceComboBoxRenderer());
        f.addElement("substance.look", c);

        f.addElement("substance.window", YSettingHelper.bool(null, I18N.t("Use System Window Decoration"), "substance.decoration", true)
            .addChangeListener(new FormElementChangeListener() {

              @Override
              public void stateChanged(FormElement form) {
                // set?
                setWindowLook(Boolean.getBoolean(form.getContentAsString()));
                YAamsCore.save();
              }
            }));

        String[] eles = new String[] { "default", "CamelThrownTrees", "CreteSenesi", "Gargoyle", "Hprich" };

        f.addElement("substance.startlogo", YSettingHelper.combo(null, I18N.t("Startlogo"), "substance.startlogo", eles[0], eles, eles));
      }
    });

    // add thanks
    ExtentionManagement.add("form.options.info", new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        ((FormBuilder) objects.get("form")).addElement("thx.substance", new FormLink("Substance", "https://substance.dev.java.net/"));
View Full Code Here

Examples of de.yaams.maker.helper.extensions.IExtension

  /**
   * @param args
   */
  public static void addTestPlay() {
    // add play button
    ExtentionManagement.add("yaframe.openTab", new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        YaTab tab = (YaTab) objects.get("tab");

        // right tab?
        if (tab instanceof ProjectTab) {

          // has project?
          final Project p = ((ProjectTab) tab).getProject();
          if (!RGSSProjectHelper.is(p, true, true)) {
            return;
          }

          // add run button
          if (ProjectSett.get(p, "run_showOnEveryTab", true) && tab.getToolbar() != null) {
            tab.getToolbar().add(YFactory.tb(I18N.t("Start ein Testspiel"), "monitor_opts", new AE() {

              @Override
              public void run() {
                runProject(p);

              }
            }));
          }
        }

      }
    });

    // add options
    // add run settings
    ExtentionManagement.add(ProjectOptionsTab.EXADD, new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        ArrayList<BasisListElement> eles = (ArrayList<BasisListElement>) objects.get("list");

View Full Code Here

Examples of de.yaams.maker.helper.extensions.IExtension

    plugs.add(new LuaMapWriter());
    plugs.add(new MappyMapWriter());
    plugs.add(new TMWServerMapWriter());

    // register extenstions
    ExtentionManagement.add(MapHelper.SAVE, new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {

        File file = (File) objects.get("file");
        Map map = (Map) objects.get("map");

        // check all types
        for (MapWriter m : plugs) {
          if (objects.containsKey("saved")) {
            break;
          }
          if (m.accept(file)) {
            try {
              m.writeMap(map, file);
              objects.put("saved", true);
            } catch (Exception e) {
              YEx.info("Can not save " + map + " under " + file, e);
            }
          }
        }
      }
    });

    // register extenstions
    ExtentionManagement.add(MapHelper.FILEXT, new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        JFileChooser chooser = (JFileChooser) objects.get("chooser");
View Full Code Here

Examples of de.yaams.maker.helper.extensions.IExtension

    for (int i = 0, l = id.length; i < l; i++) {
      isRTPinstalled(id[i], rgss[i]);
    }

    // add rtp options
    ExtentionManagement.add("form.options.rgss", new IExtension() {

      @Override
      public void work(HashMap<String, Object> objects) {
        final FormBuilder f = (FormBuilder) objects.get("form");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.