Skip to main content



      Home
Home » Eclipse Projects » GEF » Show scroll on Graphical Editor
Show scroll on Graphical Editor [message #675126] Mon, 30 May 2011 07:19 Go to next message
Eclipse UserFriend
Hi!!

I need scrolled when a figure is moved or created out of graphical viewer limits.

Any suggestion?
Re: Show scroll on Graphical Editor [message #675127 is a reply to message #675126] Mon, 30 May 2011 07:22 Go to previous messageGo to next message
Eclipse UserFriend
Take a look at EditPartViewer#reveal(EditPart). Think that should provide what you are looking for.
Re: Show scroll on Graphical Editor [message #675129 is a reply to message #675127] Mon, 30 May 2011 07:32 Go to previous messageGo to next message
Eclipse UserFriend
getViewer().reveal(this);


I use this sentence from figure part but not works...
Re: Show scroll on Graphical Editor [message #675132 is a reply to message #675129] Mon, 30 May 2011 07:39 Go to previous messageGo to next message
Eclipse UserFriend
viewer.reveal(viewer.getContents());


...and this sentence from "initializeGraphicalViewer" not works.
Re: Show scroll on Graphical Editor [message #685933 is a reply to message #675132] Mon, 20 June 2011 16:42 Go to previous messageGo to next message
Eclipse UserFriend
Do you use a FreeformLayer for your Diagram's main EditPart's Figure?
Re: Show scroll on Graphical Editor [message #685944 is a reply to message #685933] Mon, 20 June 2011 18:12 Go to previous messageGo to next message
Eclipse UserFriend
I found the solution a time ago. Now, I use FreeformLayout in my Diagram's main EditPart's Figure.

Thank you again, Phillip.

[Updated on: Mon, 20 June 2011 18:12] by Moderator

Re: Show scroll on Graphical Editor [message #717154 is a reply to message #685944] Fri, 19 August 2011 08:50 Go to previous message
Eclipse UserFriend
Hi,
My editor should have the following structure.
ie -- > 1) FirstParentPart
2) SecondParentPart
3) all shapes part
My First parent edit part have the following code,

protected IFigure createFigure()
{
final Figure figure = new FreeformLayer();
figure.setLayoutManager( new FreeformLayout() );
figure.setBorder( new MarginBorder( 3 ) );
figure.setForegroundColor( ColorConstants.black );
figure.setOpaque( false );

return figure;
}

My second edit part have the following code,

@Override
protected IFigure createFigure()
{
final Figure figure = new FreeformLayer();
figure.setLayoutManager( new FreeformLayout() );
figure.setBorder( new LineBorder( 2 ) );
figure.setForegroundColor( ColorConstants.green );
figure.setOpaque( true );
return figure;
}


Editor file (InitializeViewer method)
============
getGraphicalViewer().reveal(getGraphicalViewer().getContents());



But while running, my second parent is not visible without setting bounds. my first parent fits to the editor, but my second parent does not. What went wrong? Any help would be appreciated...Smile

Regards,
Karthikeyan.B

[Updated on: Mon, 22 August 2011 01:00] by Moderator

Previous Topic:Layout Role for connection childs
Next Topic:Gef FreeForm LAyout
Goto Forum:
  


Current Time: Sun Apr 20 19:43:25 EDT 2025

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

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

Back to the top