Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GEF in viewpart, display problem
GEF in viewpart, display problem [message #200762] Thu, 27 October 2005 08:16 Go to next message
Hao Zhang is currently offline Hao ZhangFriend
Messages: 161
Registered: July 2009
Senior Member
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 11:44 Go to previous message
Hao Zhang is currently offline Hao ZhangFriend
Messages: 161
Registered: July 2009
Senior Member
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);
> }
>
>
Previous Topic:Connection Label
Next Topic:How to begin with GEF ?
Goto Forum:
  


Current Time: Sat Dec 07 12:35:45 GMT 2024

Powered by FUDForum. Page generated in 0.03466 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top