Examples of GraphElement


Examples of org.jbpm.ui.common.model.GraphElement

            return null;
        }
    }

    public <T extends GraphElement> T createElement() {
        GraphElement element = createExecutableExtension("model");
        element.setTypeName(name);
        return (T) element;
    }
View Full Code Here

Examples of org.jbpm.ui.common.model.GraphElement

    private <T extends GraphElement> T create(Node node, GraphElement parent) {
      return create(node, parent, node.getNodeName());
    }
    private <T extends GraphElement> T create(Node node, GraphElement parent, String nodeType) {
        GraphElement element = JpdlVersionRegistry.getElementTypeDefinition(jpdlVersion, nodeType).createElement();
        if (parent != null) {
            parent.addChild(element);
        }
        if (element instanceof NamedGraphElement) {
            ((NamedGraphElement) element).setName(getAttribute(node, NAME_ATTR));
        }
        NodeList nodeList = node.getChildNodes();
        for (int j = 0; j < nodeList.getLength(); j++) {
            Node childNode = nodeList.item(j);
            if (DESCRIPTION_NODE.equals(childNode.getNodeName()) && element instanceof Describable) {
                ((Describable) element).setDescription(getTextContent(childNode));
            }
            if (DELEGATION_NODE.equals(childNode.getNodeName())) {
                ((Delegable) element).setDelegationClassName(getAttribute(childNode, CLASS_ATTR));
                element.setDelegationConfiguration(getTextContent(childNode));
            }
            if (TRANSITION_NODE.equals(childNode.getNodeName())) {
                parseTransition(childNode, element);
            }
            if (ACTION_NODE.equals(childNode.getNodeName())) {
View Full Code Here

Examples of org.jbpm.ui.common.model.GraphElement

                    hasTimeOutTransition = true;
                  }
                  transitionsCount++;
                }
            }
            GraphElement state;
            if (transitionsCount == 1 && hasTimeOutTransition) {
              state = create(node, definition, "waitState");
            } else {
              state = create(node, definition);
            }
View Full Code Here

Examples of org.jbpm.ui.common.model.GraphElement

    private static final String[] START_STATE_EVENT_TYPES = { Event.NODE_LEAVE };
    private static final String[] END_STATE_EVENT_TYPES = { Event.NODE_ENTER };
    private static final String[] NODE_EVENT_TYPES = { Event.NODE_ENTER, Event.NODE_ACTION, Event.NODE_LEAVE };

    private List<String> getAllowedEventTypes() {
        GraphElement parent = getParent();
        if (parent instanceof Transition) {
            return Arrays.asList(TRANSITION_EVENT_TYPES);
        } else if (parent instanceof State) {
            return Arrays.asList(TASK_EVENT_TYPES);
        } else if (parent instanceof StartState) {
View Full Code Here

Examples of org.jbpm.ui.common.model.GraphElement

            return;
        }
        try {
            IFile resource = (IFile) marker.getResource();
            DesignerEditor designerEditor = (DesignerEditor) IDE.openEditor(getSite().getPage(), resource);
            GraphElement graphElement = null;

            String elementName = marker.getAttribute(PluginConstants.SELECTION_LINK_KEY, null);
            if (elementName != null) {
                graphElement = findElement(designerEditor.getDefinition(), NamedGraphElement.class, elementName);
            }
View Full Code Here

Examples of org.jbpm.ui.common.model.GraphElement

        if (target == null || !target.getFigure().isVisible()) {
            getOutlineViewer().select(element);
            return;
        }
        Rectangle targetElementConstraint = element.getConstraint();
        GraphElement parentElement = element.getParent();
        while (targetElementConstraint == null && parentElement != null) {
            targetElementConstraint = parentElement.getConstraint();
            parentElement = parentElement.getParent();
        }
        if (targetElementConstraint != null) {
            Viewport viewport = (Viewport) ((FreeformGraphicalRootEditPart) getGraphicalViewer().getRootEditPart()).getFigure();
            Dimension dim = viewport.getSize();
            Point startLocation = viewport.getViewLocation().getCopy();
View Full Code Here

Examples of org.jbpm.ui.common.model.GraphElement

        });
        getGraphicalViewer().setEditPartFactory(new EditPartFactory() {
            public EditPart createEditPart(EditPart context, Object object) {
                if (!(object instanceof GraphElement))
                    return null;
                GraphElement element = (GraphElement) object;
                EditPart editPart = element.getTypeDefinition().createGraphicalEditPart(element);
                return editPart;
            }
        });

        KeyHandler keyHandler = new GraphicalViewerKeyHandler(getGraphicalViewer());
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.