|
|
|
Re: GraphicalEditor in Composite [message #926179 is a reply to message #921748] |
Fri, 28 September 2012 11:34 |
mark tal Messages: 11 Registered: July 2012 |
Junior Member |
|
|
I've managed to display graph in dialog but now I have problem with
ScrollingGraphicalViewer, I don't get the scrolling bars.
private void initialize() {
this.initData();
this.setLayout(new FillLayout());
final GraphicalViewer viewer = new ScrollingGraphicalViewer();
viewer.createControl(this); //this class extends Composite
viewer.setEditDomain(new DefaultEditDomain(null));
viewer.setRootEditPart(new ScalableFreeformRootEditPart());
//CustomEditPartFactory extends EditPartFactory
CustomEditPartFactory customEditPartFactory = new CustomEditPartFactory(this);
viewer.setEditPartFactory(customEditPartFactory);
viewer.setContents(model);
CompoundDirectedGraph graph = new CompoundDirectedGraph();
graph.nodes = nodes;
graph.edges = edges;
new CompoundDirectedGraphLayout().visit(graph);
}
After investigating i've found out that I get the scroll bars when i try to move figures outside the initial frame.
But at initialization, the diagram size is > size of the shell size.
So the question how to specify the size of the ScrollingGraphicalViewer?
[Updated on: Fri, 28 September 2012 13:33] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03390 seconds