Iterator iter = lnodes.iterator();
for (int i=0; i < lnodes.size(); i++) {
Node helpNode = (Node)((ILayoutNode)lnodes.get(i)).getNode();
if (helpNode.getElement() instanceof DataFieldType) {
if(((DataFieldType)helpNode.getElement()).getName().equals("class")) {
Bounds helpBounds = (Bounds)(helpNode).getLayoutConstraint();
helpBounds.setX(BORDER_DISTANCE + ZERO_DISTANCE);
helpBounds.setY(BORDER_DISTANCE + ZERO_DISTANCE);
}
else {
for (ExtensionType helpET :((DataFieldType)helpNode.getElement()).getExtension()) {
Bounds helpBounds = (Bounds)(helpNode).getLayoutConstraint();
if (helpET.getName().equals("xCoordinate")) {
int coordinateX = BORDER_DISTANCE + ZERO_DISTANCE + (int)(Double.parseDouble(helpET.getValue())*ZERO_DISTANCE);
// System.out.println("coordinateX: " + coordinateX);
helpBounds.setX(coordinateX);
}
if (helpET.getName().equals("yCoordinate")) {
int coordinateY = BORDER_DISTANCE + ZERO_DISTANCE + (int)(Double.parseDouble(helpET.getValue())*ZERO_DISTANCE);
// System.out.println("coordinateY: " + coordinateY);
helpBounds.setY(coordinateY);
}
helpNode.setLayoutConstraint(helpBounds);
}
}
}
if (helpNode.getElement() instanceof ExtensionType) {
if (((ExtensionType)helpNode.getElement()).getMixed().size() > 0) {
String helpString = ((FeatureMap) ((ExtensionType) helpNode
.getElement()).getMixed()).getValue(0).toString();
String comparativeString = " ";
String separatedText_X = "";
String separatedText_Y = "";
boolean foundFirst = false;
for (int j=0; j < (helpString.length() - comparativeString.length()); j++) {
if (helpString.regionMatches(j, comparativeString, 0, comparativeString.length())) {
if (foundFirst == true) {
separatedText_Y = helpString.substring(separatedText_X.length() + comparativeString.length(), j);
break;
}
if (foundFirst == false) {
separatedText_X = helpString.substring(0, j);
foundFirst = true;
}
}
}
Bounds helpBounds = (Bounds)(helpNode).getLayoutConstraint();
int coordinateX = BORDER_DISTANCE + ZERO_DISTANCE + (int)(Double.parseDouble(separatedText_X)*ZERO_DISTANCE);
// System.out.println("coordinateX: " + coordinateX);
helpBounds.setX(coordinateX);
int coordinateY = BORDER_DISTANCE + ZERO_DISTANCE + (int)(Double.parseDouble(separatedText_Y)*ZERO_DISTANCE);
// System.out.println("coordinateY: " + coordinateY);
helpBounds.setY(coordinateY);
}
}
}