use of org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates in project carbon-business-process by wso2.
the class ScopeImpl method getStartIconExitArrowCoords.
/**
* At the start: xLeft=0, yTop=0
* Calculates the coordinates of the arrow which leaves the start Scope Icon
*
* @return coordinates of the exit arrow for the start icon
* 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);
}
SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
return coords;
}
use of org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates in project carbon-business-process by wso2.
the class ScopeImpl method getStartTerminationCoords.
/**
* At the start: xLeft=0, yTop=0
* Calculates the coordinates of the start arrow of the TerminationHandler
*
* @return coordinates of the start arrow of the TerminationHandler
*/
protected SVGCoordinates getStartTerminationCoords() {
int xLeft = 0;
int yTop = 0;
if (layoutManager.isVerticalLayout()) {
xLeft = getCoreDimensions().getXLeft() + getCoreDimensions().getWidth();
yTop = getCoreDimensions().getYTop() + getHandlerIconHeight() + (getHandlerConnectorSpacing() * 2) + (getYSpacing() / 2);
} else {
xLeft = getCoreDimensions().getXLeft() + getHandlerIconWidth() + (getHandlerConnectorSpacing() * 2) + (getYSpacing() / 2);
yTop = getCoreDimensions().getYTop() + getCoreDimensions().getHeight();
}
// Returns the calculated coordinate points of the start arrow of the TerminationHandler
SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
return coords;
}
use of org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates in project carbon-business-process by wso2.
the class ScopeImpl method getTerminationHandlerIcon.
/**
* At start: xLeft=0, yTop=0
*
* @param doc SVG document which defines the components including shapes, gradients etc. of the activity
* @return Element(represents an element in a XML) which contains the TerminationHandler icon and arrow flows
*/
public Element getTerminationHandlerIcon(SVGDocument doc) {
// Get the coordinates of the start arrow of the TerminationHandler
SVGCoordinates coords = getStartTerminationCoords();
int xLeft = 0;
int yTop = 0;
if (layoutManager.isVerticalLayout()) {
xLeft = coords.getXLeft() - getHandlerIconWidth();
yTop = coords.getYTop() - (getHandlerIconHeight() / 2);
} else {
xLeft = coords.getXLeft() - (getHandlerIconWidth() / 2);
yTop = coords.getYTop() - getHandlerIconHeight();
}
// Gets the icon path of the activity
String iconPath = BPEL2SVGIcons.TERMINATIONHANDLER_ICON;
// width
return getImageDefinition(doc, iconPath, xLeft, yTop, getHandlerIconWidth(), getHandlerIconHeight(), getId());
}
use of org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates in project carbon-business-process by wso2.
the class ScopeImpl method getFaultHandlerIcon.
/**
* At start: xLeft=0, yTop=0
*
* @param doc SVG document which defines the components including shapes, gradients etc. of the activity
* @return Element(represents an element in a XML) which contains the FaultHandler icon and arrow flows
*/
public Element getFaultHandlerIcon(SVGDocument doc) {
// Get the coordinates of the start arrow of the FaultHandler
SVGCoordinates coords = getStartFaultCoords();
int xLeft = 0;
int yTop = 0;
if (layoutManager.isVerticalLayout()) {
xLeft = coords.getXLeft() - getHandlerIconWidth();
yTop = coords.getYTop() - (getHandlerIconHeight() / 2);
} else {
xLeft = coords.getXLeft() - (getHandlerIconWidth() / 2);
yTop = coords.getYTop() - getHandlerIconHeight();
}
// Gets the icon path of the activity
String iconPath = BPEL2SVGIcons.FAULTHANDLER_ICON;
// width
return getImageDefinition(doc, iconPath, xLeft, yTop, getHandlerIconWidth(), getHandlerIconHeight(), getId());
}
use of org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates in project carbon-business-process by wso2.
the class SimpleActivityImpl 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 , yTop= Ytop of the Icon + (height of startIcon)/2
*/
@Override
public SVGCoordinates getEntryArrowCoords() {
int xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
int yTop = getStartIconYTop();
if (!layoutManager.isVerticalLayout()) {
xLeft = getStartIconXLeft();
yTop = getStartIconYTop() + (getStartIconHeight() / 2);
}
// Returns the calculated coordinate points of the entry arrow
SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
return coords;
}
Aggregations