Package org.drools.eclipse.flow.common.editor.editpart.figure

Examples of org.drools.eclipse.flow.common.editor.editpart.figure.ElementFigure


    protected void applyOwnResults(ProcessEditPart diagram) {
    }

    public void applyResults(ElementEditPart elementEditPart) {
        Node n = (Node) partToNodesMap.get(elementEditPart);
        ElementFigure elementFigure = (ElementFigure) elementEditPart.getFigure();
        Rectangle bounds = new Rectangle(n.x, n.y, elementFigure.getPreferredSize().width,
                elementFigure.getPreferredSize().height);
        elementFigure.setBounds(bounds);
        for (int i = 0; i < elementEditPart.getSourceConnections().size(); i++) {
            ElementConnectionEditPart connectionPart = (ElementConnectionEditPart) elementEditPart.getSourceConnections().get(i);
            applyResults(connectionPart);
        }
    }
View Full Code Here


   
    public boolean setTableModelBounds() {
        List<ElementEditPart> tableParts = getChildren();
        for (Iterator<ElementEditPart> iter = tableParts.iterator(); iter.hasNext(); ) {
            ElementEditPart elementEditPart = (ElementEditPart) iter.next();
            ElementFigure elementFigure = (ElementFigure) elementEditPart.getFigure();
            if (elementFigure == null) {
                continue;
            }
            Rectangle constraint = elementFigure.getBounds().getCopy();
            ElementWrapper elementWrapper = elementEditPart.getElementWrapper();
            elementWrapper.setConstraint(constraint);
        }
        return true;
    }
View Full Code Here

   
    public boolean setTableModelBounds() {
        List tableParts = getChildren();
        for (Iterator iter = tableParts.iterator(); iter.hasNext(); ) {
            ElementEditPart elementEditPart = (ElementEditPart) iter.next();
            ElementFigure elementFigure = (ElementFigure) elementEditPart.getFigure();
            if (elementFigure == null) {
                continue;
            }
            Rectangle constraint = elementFigure.getBounds().getCopy();
            ElementWrapper elementWrapper = elementEditPart.getElementWrapper();
            elementWrapper.setConstraint(constraint);
        }
        return true;
    }
View Full Code Here

    protected void applyOwnResults(ProcessEditPart diagram) {
    }

    public void applyResults(ElementEditPart elementEditPart) {
        Node n = (Node) partToNodesMap.get(elementEditPart);
        ElementFigure elementFigure = (ElementFigure) elementEditPart.getFigure();
        Rectangle bounds = new Rectangle(n.x, n.y, elementFigure.getPreferredSize().width,
                elementFigure.getPreferredSize().height);
        elementFigure.setBounds(bounds);
        for (int i = 0; i < elementEditPart.getSourceConnections().size(); i++) {
            ElementConnectionEditPart connectionPart = (ElementConnectionEditPart) elementEditPart.getSourceConnections().get(i);
            applyResults(connectionPart);
        }
    }
View Full Code Here

        return new ChopboxAnchor(getFigure());
    }

    protected void refreshVisuals() {
        ElementWrapper element = getElementWrapper();
        ElementFigure figure = (ElementFigure) getFigure();
        figure.setText(element.getName());
        if (element.getConstraint().width == -1) {
            element.getConstraint().width = figure.getBounds().width;
        }
        if (element.getConstraint().height == -1) {
            element.getConstraint().height = figure.getBounds().height;
        }
        ((GraphicalEditPart) getParent()).setLayoutConstraint(this, figure, element.getConstraint());
    }
View Full Code Here

TOP

Related Classes of org.drools.eclipse.flow.common.editor.editpart.figure.ElementFigure

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.