[
https://jira.jboss.org/jira/browse/JBPM-2177?page=com.atlassian.jira.plug...
]
Koen Aers commented on JBPM-2177:
---------------------------------
This is the code that does the parsing:
private void addGraphics(NodeWrapper wrapper, Element element) {
String graphics = element.getAttribute("g");
Rectangle constraint = new Rectangle(0, 0, 80, 40);
if (graphics != null) {
StringTokenizer tokenizer = new StringTokenizer(graphics, ",");
if (tokenizer.countTokens() != 4) {
Logger.logInfo(
"Wrong info in attribute 'g' for element '" +
element.getNodeName() + "'" +
" with name '" +
element.getAttribute("name") +
"'. Using defaults." );
} else {
constraint.x = convertStringToInt(tokenizer.nextToken());
constraint.y = convertStringToInt(tokenizer.nextToken());
constraint.width = convertStringToInt(tokenizer.nextToken());
constraint.height = convertStringToInt(tokenizer.nextToken());
}
}
wrapper.setConstraint(constraint);
}
private int convertStringToInt(String str) {
int result = 0;
try {
result = new Integer(str).intValue();
} catch (NumberFormatException e) {
Logger.logError("Error while converting " + str + " to an
integer.", e);
}
return result;
}
expose activity coordinates programmatically
--------------------------------------------
Key: JBPM-2177
URL:
https://jira.jboss.org/jira/browse/JBPM-2177
Project: JBoss jBPM
Issue Type: Task
Security Level: Public(Everyone can see)
Reporter: Tom Baeyens
Assignee: Tom Baeyens
Fix For: jBPM 4.0.0.Beta2
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira