Package org.jbpm.ui.dialog

Examples of org.jbpm.ui.dialog.TreeItem


            public void linkActivated(HyperlinkEvent e) {
                try {
                    TreeViewSelectionDialog dialog = new TreeViewSelectionDialog(Messages.getString("RunaOrgDialog.Text"));
                    dialog.setItems(getAsTree());
                    if (dialog.open() == IDialogConstants.OK_ID) {
                        TreeItem treeItem = dialog.getSelectedItem();
                        selectionText.setText(treeItem.getLabel());
                        selectionText.setForeground(treeItem.getColor());
                        OrgFunctionDefinition definition = createNew();
                        definition.getParameters().get(0).setValue((String) treeItem.getTag());
                        fireCompletedEvent(definition);
                    }
                } catch (Exception ex) {
                    DesignerLogger.logError("Unable to load executors", ex);
                }
View Full Code Here


      return null;
  }

    private TreeItem getAsTree() throws Exception {
      Set<Firm> firms = getFirmsTree();
      TreeItem root = new TreeItem("Root");
      for (Firm firm : firms) {
      TreeItem firmItem = new TreeItem(firm.name);
      root.addChild(firmItem);
      for (Department department : firm.departments) {
        TreeItem departmentItem = new TreeItem(department.shortName);
        firmItem.addChild(departmentItem);
        for (Actor actor : department.actors) {
          TreeItem actorItem = new TreeItem(actor.name);
          actorItem.setAllowSelection(true);
          actorItem.setTag(String.valueOf(actor.id));
          actorItem.setColor(actor.getForeground());
          departmentItem.addChild(actorItem);
        }
      }
    }
      return root;
View Full Code Here

TOP

Related Classes of org.jbpm.ui.dialog.TreeItem

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.