Saving style changes [message #1456694] |
Thu, 30 October 2014 12:28  |
Eclipse User |
|
|
|
When double clicking on a bordered node i want to "highlight" connected edges by changing the color and width. However it doesnt get saved. Everytime i double click the node the property red of strokelayout is 0 again.
Any suggestions?
private void showEdgeConnections(DNodeSpec nodeSpec){
System.out.println(nodeSpec.getIncomingEdges().get(0).getOwnedStyle().getStrokeColor().getRed());
for (DEdge dEdge : nodeSpec.getIncomingEdges()) {
changeColor(dEdge);
}
for (DEdge dEdge : nodeSpec.getOutgoingEdges()) {
changeColor(dEdge);
}
System.out.println(nodeSpec.getIncomingEdges().get(0).getOwnedStyle().getStrokeColor().getRed());
}
private void changeColor(DEdge dEdge) {
EdgeStyle style = dEdge.getOwnedStyle();
style.setSize(5);
RGBValues lineColor = style.getStrokeColor();
lineColor.setRed(255);
lineColor.setBlue(0);
lineColor.setGreen(0);
style.setStrokeColor(lineColor);
dEdge.setOwnedStyle(style);
}
[Updated on: Fri, 31 October 2014 03:20] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05667 seconds