Package org.drools.eclipse.flow.common.editor.core

Examples of org.drools.eclipse.flow.common.editor.core.ElementWrapper


            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


            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 class ElementContainerLayoutEditPolicy extends XYLayoutEditPolicy {
   
    protected Command getCreateCommand(CreateRequest request) {
        AddElementCommand command = new AddElementCommand();
        command.setParent((ElementContainer) getHost().getModel());
        ElementWrapper element = (ElementWrapper) request.getNewObject();
        element.setConstraint((Rectangle) getConstraintFor(request));
        command.setChild(element);
        return command;
    }
View Full Code Here

    public ConnectionAnchor getTargetConnectionAnchor(Request request) {
        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

            super(clazz);
            this.name = name;
        }

        public Object getNewObject() {
            ElementWrapper wrapper = (ElementWrapper) super.getNewObject();
            wrapper.setName(name);
            return wrapper;
        }
View Full Code Here

            super(clazz);
            this.name = name;
        }

        public Object getNewObject() {
            ElementWrapper wrapper = (ElementWrapper) super.getNewObject();
            wrapper.setName(name);
            return wrapper;
        }
View Full Code Here

TOP

Related Classes of org.drools.eclipse.flow.common.editor.core.ElementWrapper

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.