GEF in viewpart, display problem [message #200762] |
Thu, 27 October 2005 04:16  |
Eclipse User |
|
|
|
Hi all:
I need to port GEF into a viewpart, I read some useful posts here and got
things almost done, but still one problem...
The viewer doesn't display figures, I have to resize the view a bit to
make the them appear, I tried in vain a lot methods such as
graphicalViewer.flush(), figureCanvas.redraw(), etc. Can you figure out
for me where the problem is, thanks in advance.
Here is the code:
ScrollingGraphicalViewer graphicalViewer;
FigureCanvas figureCanvas;
public void createPartControl(Composite parent) {
parent.setLayout(new FillLayout());
graphicalViewer = new ScrollingGraphicalViewer();
ScalableFreeformRootEditPart root = new ScalableFreeformRootEditPart();
graphicalViewer.setRootEditPart(root);
graphicalViewer.setEditDomain(new EditDomain());
graphicalViewer.setEditPartFactory(new AsisPartFactory());
figureCanvas = (FigureCanvas) graphicalViewer.createControl(parent);
graphicalViewer.setContents(analyzer);
}
|
|
|
Re: GEF in viewpart, display problem [message #201235 is a reply to message #200762] |
Mon, 31 October 2005 06:44  |
Eclipse User |
|
|
|
After replaced ScalableFreeformRootEditPart with ScalableRootEditPart,
problem solved.
ZhangHao wrote:
> Hi all:
> I need to port GEF into a viewpart, I read some useful posts here and
> got things almost done, but still one problem...
>
> The viewer doesn't display figures, I have to resize the view a bit to
> make the them appear, I tried in vain a lot methods such as
> graphicalViewer.flush(), figureCanvas.redraw(), etc. Can you figure out
> for me where the problem is, thanks in advance.
>
> Here is the code:
>
> ScrollingGraphicalViewer graphicalViewer;
> FigureCanvas figureCanvas;
> public void createPartControl(Composite parent) {
> parent.setLayout(new FillLayout());
> graphicalViewer = new ScrollingGraphicalViewer();
> ScalableFreeformRootEditPart root = new ScalableFreeformRootEditPart();
> graphicalViewer.setRootEditPart(root);
> graphicalViewer.setEditDomain(new EditDomain());
> graphicalViewer.setEditPartFactory(new AsisPartFactory());
> figureCanvas = (FigureCanvas) graphicalViewer.createControl(parent);
> graphicalViewer.setContents(analyzer);
> }
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04468 seconds