Examples of TreeData


Examples of sos.scheduler.editor.app.TreeData

    FontData fontDatas[] = item.getFont().getFontData();
    FontData data = fontDatas[0];
    boolean isBold = false;

    TreeData data_ = (TreeData) item.getData();
   
    if(data_ == null || data_.getElement() == null)
      return;     
     
    int type = data_.getType();
    Element elem = data_.getElement();
   
    if (type == Editor.EVERYDAY) {     
      if(!elem.getChildren("period").isEmpty() || !elem.getChildren("at").isEmpty())
        isBold = true;
     
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

  public void updateRunTime() {
   
    if(tree.getSelectionCount()> 0) {
      TreeItem item = tree.getSelection()[0];
      item.removeAll();
      TreeData data = (TreeData)item.getData();     
      listener.treeFillRunTimes(item, data.getElement(), !Utils.isElementEnabled("job", dom, data.getElement()), "run_time");
    }
   
  }
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

        Utils.setResetElement(_dom.getRoot());
        Element desc = _dom.getRoot();

        TreeItem item = new TreeItem(tree, SWT.NONE);
        item.setText("Job");
        item.setData(new TreeData(Editor.DOC_JOB, desc.getChild("job", _dom.getNamespace()), Options
                .getDocHelpURL("job")));

        TreeItem item2 = new TreeItem(item, SWT.NONE);
        item2.setText("Process");
        item2.setData(new TreeData(Editor.DOC_PROCESS, desc.getChild("job", _dom.getNamespace()), Options
                .getDocHelpURL("process")));
        item2 = new TreeItem(item, SWT.NONE);
        item2.setText("Script");
        item2.setData(new TreeData(Editor.DOC_SCRIPT, desc.getChild("job", _dom.getNamespace()), Options
                .getDocHelpURL("script")));
        item2 = new TreeItem(item, SWT.NONE);
        item2.setText("Monitor");
        item2.setData(new TreeData(Editor.DOC_MONITOR, desc.getChild("job", _dom.getNamespace()), Options
                .getDocHelpURL("monitor")));
        item.setExpanded(true);

        item = new TreeItem(tree, SWT.NONE);
        item.setText("Releases");
        item.setData(new TreeData(Editor.DOC_RELEASES, desc.getChild("releases", _dom.getNamespace()), Options
                .getDocHelpURL("releases")));
       
        treeFillReleases(item, desc.getChild("releases", _dom.getNamespace()));
        item.setExpanded(true);
       
        item = new TreeItem(tree, SWT.NONE);
        item.setText("Resources");
        item.setData(new TreeData(Editor.DOC_RESOURCES, desc, Options.getDocHelpURL("resources")));
        item2 = new TreeItem(item, SWT.NONE);
        item2.setText("Files");
        item2.setData(new TreeData(Editor.DOC_FILES, desc, Options.getDocHelpURL("files")));
        item2 = new TreeItem(item, SWT.NONE);
        item2.setText("Databases");
        item2.setData(new TreeData(Editor.DOC_DATABASES, desc, Options.getDocHelpURL("databases")));
        item.setExpanded(true);
        treeFillDatabaseResources(item2, desc.getChild("resources", _dom.getNamespace()));

        item = new TreeItem(tree, SWT.NONE);
        item.setText("Configuration");
        item.setData(new TreeData(Editor.DOC_CONFIGURATION, desc.getChild("configuration", _dom.getNamespace()),
                Options.getDocHelpURL("configuration")));
        item2 = new TreeItem(item, SWT.NONE);
        item2.setText("Parameters");
        item2.setData(new TreeData(Editor.DOC_PARAMS, desc.getChild("configuration", _dom.getNamespace()), Options
                .getDocHelpURL("parameters")));
        item.setExpanded(true);
        item2 = new TreeItem(item, SWT.NONE);
        item2.setText("Payload");
        item2.setData(new TreeData(Editor.DOC_PAYLOAD, desc.getChild("configuration", _dom.getNamespace()), Options
                .getDocHelpURL("payload")));
        item2 = new TreeItem(item, SWT.NONE);
        item2.setText("Settings");
        item2.setData(new TreeData(Editor.DOC_SETTINGS, desc.getChild("configuration", _dom.getNamespace()), Options
                .getDocHelpURL("settings")));

        _profiles = new TreeItem(item2, SWT.NONE);
        item2.setExpanded(true);
        _profiles.setText("Profiles");
        _profiles.setData(new TreeData(Editor.DOC_PROFILES, desc.getChild("configuration", _dom.getNamespace()),
                Options.getDocHelpURL("profiles")));
        fillProfiles();

        _connections = new TreeItem(item2, SWT.NONE);
        _connections.setText("Connections");
        _connections.setData(new TreeData(Editor.DOC_CONNECTIONS, desc.getChild("configuration", _dom.getNamespace()),
                Options.getDocHelpURL("connections")));
        fillConnections();

        item = new TreeItem(tree, SWT.NONE);
        item.setText("Documentation");
        /*if(desc.getChild("documentation", desc.getNamespace()) == null)
          desc.addContent(new Element("documentation", desc.getNamespace())).addContent(new Element("div", org.jdom.Namespace.getNamespace("http://www.w3.org/1999/xhtml")));
        else if(desc.getChild("documentation", desc.getNamespace()).getChild("div",org.jdom.Namespace.getNamespace("http://www.w3.org/1999/xhtml"))==null)
          desc.getChild("documentation", desc.getNamespace()).addContent(new Element("div", org.jdom.Namespace.getNamespace("http://www.w3.org/1999/xhtml")));
        */
        item.setData(new TreeData(Editor.DOC_DOCUMENTATION, desc, Options.getDocHelpURL("documentation")));
       

    }
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

            for (Iterator it = settings.getChildren("profile", _dom.getNamespace()).iterator(); it.hasNext();) {
                Element element = (Element) it.next();
                TreeItem item = new TreeItem(_profiles, SWT.NONE);
                String name = Utils.getAttributeValue("name", element);
                item.setText("Sections [Profile: " + (name != null ? name : ProfilesListener.defaultName) + "]");
                item.setData(new TreeData(Editor.DOC_SECTIONS, element, Options.getDocHelpURL("sections")));
                _profiles.setExpanded(true);
                fillSections(item, element, false);
            }
        }
    }
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

            for (Iterator it = settings.getChildren("connection", _dom.getNamespace()).iterator(); it.hasNext();) {
                Element element = (Element) it.next();
                TreeItem item = new TreeItem(_connections, SWT.NONE);
                String name = Utils.getAttributeValue("name", element);
                item.setText("Applications [Connection: " + (name != null ? name : ConnectionsListener.defaultName) + "]");
                item.setData(new TreeData(Editor.DOC_APPLICATIONS, element, Options.getDocHelpURL("applications")));
                _connections.setExpanded(true);
                fillApplications(item, element, false);
            }
        }
    }
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

        parent.removeAll();
        for (Iterator it = element.getChildren("application", _dom.getNamespace()).iterator(); it.hasNext();) {
            Element section = (Element) it.next();
            TreeItem item = new TreeItem(parent, SWT.NONE);
            item.setText("Sections [Appl.: " + Utils.getAttributeValue("name", section) + "]");
            item.setData(new TreeData(Editor.DOC_SECTIONS, section, Options.getDocHelpURL("sections")));
            parent.setExpanded(expand);
            fillSections(item, section, false);
        }
    }
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

        parent.removeAll();
        for (Iterator it = element.getChildren("section", _dom.getNamespace()).iterator(); it.hasNext();) {
            Element section = (Element) it.next();
            TreeItem item = new TreeItem(parent, SWT.NONE);
            item.setText("Settings [Section: " + Utils.getAttributeValue("name", section) + "]");
            item.setData(new TreeData(Editor.DOC_SECTION_SETTINGS, section, Options.getDocHelpURL("setting")));
            parent.setExpanded(expand);
        }
    }
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

                        return false;
                    children[i].dispose();
                }

                TreeItem item = tree.getSelection()[0];
                TreeData data = (TreeData) item.getData();

                _dom.setInit(true);

                switch (data.getType()) {
                    case Editor.DOC_JOB:
                        new JobForm(c, SWT.NONE, _dom, data.getElement());
                        break;
                    case Editor.DOC_PROCESS:
                        new ProcessForm(c, SWT.NONE, _dom, data.getElement());
                        break;
                    case Editor.DOC_SCRIPT:
                        new JobScriptForm(c, SWT.NONE, _dom, data.getElement());
                        break;
                    case Editor.DOC_MONITOR:
                        ScriptForm form = new ScriptForm(c, SWT.NONE);
                        form.setTitle("Monitor");
                        form.setParams(_dom, data.getElement(), Editor.DOC_MONITOR);
                        form.init(true, true);
                        break;
                    case Editor.DOC_RELEASES:
                        new ReleasesForm(c, SWT.NONE, _dom, data.getElement(), _gui);
                        break;
                    case Editor.DOC_RELEASE:
                        new ReleaseForm(c, SWT.NONE, _dom, data.getElement());
                        break;
                       
                    case Editor.DOC_RELEASE_AUTHOR:
                        new AuthorsForm(c, SWT.NONE, _dom, data.getElement());
                        break;                                           
                    case Editor.DOC_RESOURCES:
                        new ResourcesForm(c, SWT.NONE, _dom, data.getElement());
                        break;
                    case Editor.DOC_DATABASES:
                        new DatabasesForm(c, SWT.NONE, _dom, data.getElement(), _gui);
                        break;
                    case Editor.DOC_DATABASES_RESOURCE:
                        new DatabaseResourcesForm(c, SWT.NONE, _dom, data.getElement());
                        break;
                    case Editor.DOC_FILES:
                        new FilesForm(c, SWT.NONE, _dom, data.getElement());
                        break;
                    case Editor.DOC_DOCUMENTATION:
                        NoteForm doc = new NoteForm(c, SWT.NONE, Editor.DOC_DOCUMENTATION);
                        doc.setTitle("Note");
                         doc.setParams(_dom, data.getElement(), "documentation", false);
                        break;
                    case Editor.DOC_CONFIGURATION:
                        NoteForm note = new NoteForm(c, SWT.NONE, Editor.DOC_CONFIGURATION);
                        note.setTitle("Configuration Note");
                        note.setParams(_dom, data.getElement(), "note", true);
                        break;
                    case Editor.DOC_PARAMS:
                        new ParamsForm(c, SWT.NONE, _dom, data.getElement());
                        break;
                    case Editor.DOC_PAYLOAD:
                        new PayloadForm(c, SWT.NONE, _dom, data.getElement());
                        break;
                    case Editor.DOC_SETTINGS:
                        SettingsListener listener = new SettingsListener(_dom, data.getElement());
                        listener.setSettings();
                        NoteForm settings = new NoteForm(c, SWT.NONE, Editor.DOC_SETTINGS);
                        settings.setSettingsListener(listener);
                        settings.setTitle("Settings Note");
                        settings.setParams(_dom, listener.getSettingsElement(), "note", true);
                        break;
                    case Editor.DOC_PROFILES:
                        new ProfilesForm(c, SWT.NONE, _dom, data.getElement(), this);
                        break;
                    case Editor.DOC_SECTIONS:
                        new SectionsForm(c, SWT.NONE, _dom, data.getElement(), this, item);
                        break;
                    case Editor.DOC_SECTION_SETTINGS:
                        new SettingForm(c, SWT.NONE, _dom, data.getElement());
                        break;
                    case Editor.DOC_CONNECTIONS:
                        new ConnectionsForm(c, SWT.NONE, _dom, data.getElement(), this);
                        break;
                    case Editor.DOC_APPLICATIONS:
                        new ApplicationsForm(c, SWT.NONE, _dom, data.getElement(), this, item);
                        break;
                    default:
                        System.out.println("no form found for " + item.getText());
                }
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

      while (it.hasNext()) {
        Element e = (Element) it.next();
        if (e.getAttributeValue("on_exit_code") != null) {
          TreeItem item = new TreeItem(parent, SWT.NONE);
          item.setText(e.getAttributeValue("on_exit_code"));
          item.setData(new TreeData(Editor.JOB_COMMAND, e, Options.getHelpURL("job.commands")));

          if (listOfReadOnly != null && listOfReadOnly.contains(Utils.getAttributeValue("name", job))) {
            item.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_GRAY));
          } else {
            item.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_BLACK));
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

            item.setData("max_occur", "1");
            item.setData("key", e.getName() +"_@_");
            item.setData("copy_element", e);

            //item.setData(new TreeData(Editor.PERIODS, (Element)w.elements.get(token), Options.getHelpURL("periods")));
            item.setData(new TreeData(Editor.PERIODS, e, Options.getHelpURL("periods")));

            if(!Utils.isElementEnabled("job", _dom, _runtime)) {
              item.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_GRAY));
            }
          }
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.