Examples of TreeData


Examples of sos.scheduler.editor.app.TreeData

        Element release = (Element)listOfRelease.get(i);
       
        //Release
        TreeItem item = new TreeItem(parent, SWT.NONE);
        item.setText("Release: " + Utils.getAttributeValue("id", release));
        item.setData(new TreeData(Editor.DOC_RELEASE, release, Options.getDocHelpURL("releases")));
       
       
        //Autoren
        TreeItem itemAuthor = new TreeItem(item, SWT.NONE);
        itemAuthor.setText("Author");       
        itemAuthor.setData(new TreeData(Editor.DOC_RELEASE_AUTHOR, release, Options.getDocHelpURL("releases")));
       
        item.setExpanded(true);
        itemAuthor.setExpanded(true);       
      }
     
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

      java.util.List list = resources.getChildren("database", resources.getNamespace());
      for(int i = 0; i< list.size(); i++) {
        Element database = (Element)list.get(i);
        TreeItem itemDatabase = new TreeItem(parent, SWT.NONE);
        itemDatabase.setText(PREFIX_DATABSE +  Utils.getAttributeValue("name", database));       
        itemDatabase.setData(new TreeData(Editor.DOC_DATABASES_RESOURCE, database, Options.getDocHelpURL("databases")));
       
        parent.setExpanded(true);
        itemDatabase.setExpanded(true);
      }
     
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

            while (it.hasNext()) {
                Element e = (Element) it.next();
                if (e.getAttributeValue("date") != null) {
                    TreeItem item = new TreeItem(parent, SWT.NONE);
                    item.setText(e.getAttributeValue("date"));
                    item.setData(new TreeData(Editor.PERIODS, e, Options.getHelpURL("periods")));
                    if(!Utils.isElementEnabled("job", _dom, e)) {
                      item.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_GRAY));
                    }
                }
            }
        }

        ArrayList l = new ArrayList();
        if(_listOfAt != null) {
          Iterator it = _listOfAt.iterator();
           while (it.hasNext()) {
                 Element e = (Element) it.next();                
                 if (e.getAttributeValue("at") != null) {
                   String sDate = e.getAttributeValue("at").split(" ")[0];                  
                   String[] splitDate = sDate.split("-");
                   if(!exists(Utils.str2int(splitDate[0]), Utils.str2int(splitDate[1]), Utils.str2int(splitDate[2]))
                    && !dateExistInList(parent, sDate) ) {
                     Element a = new Element("date");
                     Utils.setAttribute("date", Utils.getAttributeValue("at", e).substring(0, 10), a);                   
                     l.add(a);
                   }
                 }
             }
        }
       
        for(int i =0; i < l.size(); i++) {         
          Element e = (Element)l.get(i);         
          if(!dateExistInList(parent, Utils.getAttributeValue("date", e))) {
            _list.add(l.get(i));
            TreeItem item = new TreeItem(parent, SWT.NONE);
            item.setText(e.getAttributeValue("date"));   
           
            item.setData(new TreeData(Editor.PERIODS, (Element)l.get(i), Options.getHelpURL("periods")));
            if(!Utils.isElementEnabled("job", _dom, e)) {
                  item.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_GRAY));
                }
          }
        }
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData


    public String getHelpKey() {
        if (tree.getSelectionCount() > 0) {
            TreeItem item = tree.getSelection()[0];
            TreeData data = (TreeData) item.getData();
            if (data != null && data.getHelpKey() != null)
                return data.getHelpKey();
        }
        return null;
    }
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

        Element desc = _dom.getRoot();
        sos.scheduler.editor.app.Utils.setResetElement(_dom.getRoot());
        TreeItem item = new TreeItem(tree, SWT.NONE);
        item.setText("Actions");
        item.setData(new TreeData(Editor.ACTIONS, desc, Options.getDocHelpURL("actions")));

        treeFillAction(item);
     

    }
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();
               
                if(data == null)
                  return false;
               
                //System.out.println("test: "  + item.getText());
               
               
                _dom.setInit(true);

                switch (data.getType()) {
                    case Editor.ACTIONS:
                        new sos.scheduler.editor.actions.forms.ActionsListForm(c, SWT.NONE, _dom, data.getElement(), _gui);
                        break;
                    case Editor.ACTION:                      
                        new sos.scheduler.editor.actions.forms.ActionForm(c, SWT.NONE, _dom, data.getElement(), _gui);
                        break;
                  
                    case Editor.EVENTS:
                        new EventsForm(c, SWT.NONE, _dom, data.getElement(), _gui);
                        break;
                    case Editor.EVENT_GROUP:
                      new EventForm(c, SWT.NONE, _dom, data.getElement(), Editor.EVENT_GROUP);
                     
                        break;
                    case Editor.ADD_EVENT_GROUP:
                       new EventForm(c, SWT.NONE, _dom, data.getElement(), Editor.ADD_EVENT_GROUP);
                     
                        break;  
                    case Editor.REMOVE_EVENT_GROUP:
                        new EventForm(c, SWT.NONE, _dom, data.getElement(), Editor.REMOVE_EVENT_GROUP);
                     
                        break;  
                    case Editor.ACTION_COMMANDS:
            //new JobCommandsForm(c, SWT.NONE, _dom, data.getElement(), _gui, this);
                      new JobCommandsForm(c, SWT.NONE, _dom, data.getElement(), _gui);             
                        break;
                    case Editor.JOB_COMMAND_EXIT_CODES:
            new sos.scheduler.editor.actions.forms.JobCommandNamesForm(c, SWT.NONE, _dom, data.getElement(), _gui);
            break;
                    case Editor.JOB_COMMAND:
            new JobCommandForm(c, SWT.NONE, _dom, data.getElement(), _gui);
            break;
                    case Editor.PARAMETER:         
            //int type = getType(data.getElement());
            new sos.scheduler.editor.actions.forms.ParameterForm(c, SWT.NONE, _dom, data.getElement(), _gui, Editor.JOB_COMMANDS);           
            break;
           
                    default:
                        System.out.println("no form found for " + item.getText());
                }
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

      for(int i = 0; i < list.size(); i++) {
        Element action = (Element)list.get(i);
        TreeItem item = new TreeItem(parent, SWT.NONE);
        item.setText(ACTION_PREFIX + Utils.getAttributeValue("name", action));
        item.setData(new TreeData(Editor.ACTION, action, Options.getDocHelpURL("action")));

        fillEvents(item, action);
        fillCommands(item, action);
       
        item.setExpanded(true);
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

    }
   
    public void fillCommands(TreeItem parent, Element action) {
      TreeItem item = new TreeItem(parent, SWT.NONE);
        item.setText("Commands");
        item.setData(new TreeData(Editor.ACTION_COMMANDS, action, Options.getDocHelpURL("commands")));
        treeFillCommands(item, action, true);
    }
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

    public void fillEvents(TreeItem parent,Element action) {
      parent.removeAll();
     
      TreeItem item = new TreeItem(parent, SWT.NONE);
      item.setText("Events");
      item.setData(new TreeData(Editor.EVENTS, action, Options.getDocHelpURL("events")));
      fillEventGroup(item, action);
     
    }
View Full Code Here

Examples of sos.scheduler.editor.app.TreeData

        List l = events.getChildren("event_group");
        for(int i = 0; i < l.size(); i++) {
          Element eventGroup = (Element)l.get(i);
          TreeItem item2 = new TreeItem(parent, SWT.NONE);
          item2.setText(GROUP_PREFIX + Utils.getAttributeValue("group", eventGroup));
          item2.setData(new TreeData(Editor.EVENT_GROUP, eventGroup, Options.getDocHelpURL("event_group")));
          //item.setExpanded(true); 
        }
      }
    }
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.