Search in sources :

Example 11 with SVGCoordinates

use of org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates in project carbon-business-process by wso2.

the class ScopeImpl method getEndIconEntryArrowCoords.

/**
 * At the start: xLeft=0, yTop=0
 * Calculates the coordinates of the arrow which enters the end icon
 *
 * @return coordinates of the entry arrow for the end icon
 * After Calculations(Vertical Layout): xLeft= Xleft of Icon + (width of icon)/2 , yTop= Ytop of the Icon
 */
protected SVGCoordinates getEndIconEntryArrowCoords() {
    int xLeft = 0;
    int yTop = 0;
    if (layoutManager.isVerticalLayout()) {
        xLeft = getEndIconXLeft() + (getEndIconWidth() / 2);
        yTop = getEndIconYTop();
    } else {
        xLeft = getEndIconXLeft();
        yTop = getEndIconYTop() + (getEndIconHeight() / 2);
    }
    // Returns the calculated coordinate points of the entry arrow of the endIcon
    SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
    return coords;
}
Also used : SVGCoordinates(org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates)

Example 12 with SVGCoordinates

use of org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates in project carbon-business-process by wso2.

the class ScopeImpl method getStartCompensationCoords.

/**
 * At the start: xLeft=0, yTop=0
 * Calculates the coordinates of the start arrow of the CompensationHandler
 *
 * @return coordinates of the start arrow of the CompensationHandler
 */
protected SVGCoordinates getStartCompensationCoords() {
    int xLeft = 0;
    int yTop = 0;
    if (layoutManager.isVerticalLayout()) {
        xLeft = getCoreDimensions().getXLeft() + getCoreDimensions().getWidth();
        yTop = getCoreDimensions().getYTop() + (getHandlerIconHeight() * 2) + (getHandlerConnectorSpacing() * 3) + (getYSpacing() / 2);
    } else {
        xLeft = getCoreDimensions().getXLeft() + (getHandlerIconWidth() * 2) + (getHandlerConnectorSpacing() * 3) + (getYSpacing() / 2);
        yTop = getCoreDimensions().getYTop() + getCoreDimensions().getHeight();
    }
    // Returns the calculated coordinate points of the start arrow of the CompensationHandler
    SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
    return coords;
}
Also used : SVGCoordinates(org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates)

Example 13 with SVGCoordinates

use of org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates in project carbon-business-process by wso2.

the class ProcessImpl method getExitArrowCoords.

/**
 * At the start: xLeft= xLeft of startIcon + (width of startIcon)/2, yTop= yTop of startIcon + height of startIcon
 * Calculates the coordinates of the arrow which leaves an activity
 *
 * @return coordinates/exit point of the exit arrow for the activities
 */
@Override
public SVGCoordinates getExitArrowCoords() {
    int xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
    int yTop = getStartIconYTop() + getStartIconHeight();
    if (!layoutManager.isVerticalLayout()) {
        xLeft = getStartIconXLeft() + getStartIconWidth();
        yTop = getStartIconYTop() + (getStartIconHeight() / 2);
    }
    // Returns the calculated coordinate points of the exit arrow
    SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
    return coords;
}
Also used : SVGCoordinates(org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates)

Example 14 with SVGCoordinates

use of org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates in project carbon-business-process by wso2.

the class SequenceImpl method getEntryArrowCoords.

/**
 * At the start: xLeft=Xleft of Icon + (width of icon)/2 , yTop= Ytop of the Icon
 * Calculates the coordinates of the arrow which enters an activity
 *
 * @return coordinates/entry point of the entry arrow for the activities
 * After Calculations(Vertical Layout): xLeft=Xleft of Icon + (width of icon)/2 , yTop= Ytop of the Icon
 */
@Override
public SVGCoordinates getEntryArrowCoords() {
    int xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
    int yTop = getStartIconYTop();
    SVGCoordinates coords = null;
    if (layoutManager.isVerticalLayout()) {
        // Sets the coordinates of the arrow
        coords = new SVGCoordinates(xLeft, yTop);
    } else {
        coords = new SVGCoordinates(yTop, xLeft);
    }
    // Check for Sub Activities
    if (subActivities != null && subActivities.size() > 0) {
        ActivityInterface activity = subActivities.get(0);
        // Get the entry arrow coordinate for each subActivity
        coords = activity.getEntryArrowCoords();
    }
    // Returns the calculated coordinate points of the entry arrow
    return coords;
}
Also used : ActivityInterface(org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface) SVGCoordinates(org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates)

Example 15 with SVGCoordinates

use of org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates in project carbon-business-process by wso2.

the class ActivityImpl method getStartIconExitArrowCoords.

/**
 * At the start: xLeft=0, yTop=0
 * Calculates the coordinates of the arrow which leaves the activity
 *
 * @return coordinates of the exit arrow for the activity
 * After Calculations(Vertical Layout): xLeft= Xleft of Icon + (width of icon)/2 , yTop= Ytop of the Icon +
 * height of the icon
 */
protected SVGCoordinates getStartIconExitArrowCoords() {
    int xLeft = 0;
    int yTop = 0;
    if (layoutManager.isVerticalLayout()) {
        xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
        yTop = getStartIconYTop() + getStartIconHeight();
    } else {
        xLeft = getStartIconXLeft() + getStartIconWidth();
        yTop = getStartIconYTop() + (getStartIconHeight() / 2);
    }
    // Returns the calculated coordinate points of the exit arrow of the activity
    SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
    return coords;
}
Also used : SVGCoordinates(org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates)

Aggregations

SVGCoordinates (org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates)59 ActivityInterface (org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface)14 OMElement (org.apache.axiom.om.OMElement)10 Element (org.w3c.dom.Element)10