Sequence diagrams and GraphAPI (almost done)

Hi Serega,

My sequence diagram is almost done (see attached picture), but I still have some important questions abou Graph API (the deadline is today):

- Edges become crazy when source e target nodes are the same

- Is there any sendToFront(Node) option in Graph API?

- I'd like to remove some options from toolbar and disable grid (view.setGridVisible and so on does not work)

Thank you again,

André

6 comments

Oops... I forgot the file



Attachment(s):
sample.JPG
0

Andre,

>I'd like to remove some options from toolbar and disable grid (view.setGridVisible
and so on does not work)
1. Graph PresentationModel:
public void customizeSettings(final Graph2DView view, final EditMode editMode)
{
***
editMode.setGridVisible(false); // must work
***
}
2. // popup actions:

Graph PresentationModel:

protected DefaultActionGroup getCommonActionGroup() {
DefaultActionGroup group = new DefaultActionGroup();

group.add(ActionManager.getInstance().getAction("Graph.ZoomIn");
...

return group;
}


action's names are here :))

]]>


toolbar actions: (customize your own actions insteed of getBasicToolbar())
GraphViewUtil:
public static DefaultActionGroup getBasicToolbar(final Graph2D graph) {
DefaultActionGroup actions = new DefaultActionGroup();

actions.add(new ShowHideGridAction(graph));
actions.add(new SnapToGridAction(graph));
actions.addSeparator();

actions.add(new ZoomInAction(graph));
actions.add(new ZoomOutAction(graph));

actions.add(new ActualZoomAction(graph));

actions.add(new FitContentAction(graph));
actions.addSeparator();

actions.add(new ApplyCurrentLayoutAction(graph));
actions.addSeparator();
actions.add(new ExportToFileAction(graph));
actions.add(new PrintGraphAction(graph));
actions.add(new PrintPreviewAction(graph));
actions.addSeparator();
actions.add(new DeleteSelectionAction());

return actions;
}




0

Hi Serega,

Thank you very much for your help!

And how about the "crazy edges" and "sendToFront"? is there a possible solution for these questions?

Thanks,

Andre

0

- Edges become crazy when source e target nodes are the same


1. may be problem of using PolyLineEdgeRealizer?

GraphPresentation:
protected EdgeRealizer createCustomEdgeRealizer(...) {
final PolyLineEdgeRealizer edgeRealizer = GraphManager.getGraphManager().createPolyLineEdgeRealizer();
...
}
you could try others: http://yfiles.com/products/yfiles/doc/developers-guide/realizers.html#edge_realizers

but it'll help scarcely. : )))

2. If you add such messages dynamicly, try update graph or relayout view.

3. may be this: http://yfiles.com/products/yfiles/doc/developers-guide/orthogonal_edge_router.html
????

Serega




0

Hi Serega,

Thank you very much for your help. The diagram is ready!!! (see image attached)

Andre



Attachment(s):
diagram.JPG
0

Please sign in to leave a comment.