Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Show scroll on Graphical Editor
Show scroll on Graphical Editor [message #675126] Mon, 30 May 2011 11:19 Go to next message
JeTBLaCK  is currently offline JeTBLaCK Friend
Messages: 41
Registered: March 2011
Member
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 11:22 Go to previous messageGo to next message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 244
Registered: July 2009
Location: Lünen
Senior Member
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 11:32 Go to previous messageGo to next message
JeTBLaCK  is currently offline JeTBLaCK Friend
Messages: 41
Registered: March 2011
Member
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 11:39 Go to previous messageGo to next message
JeTBLaCK  is currently offline JeTBLaCK Friend
Messages: 41
Registered: March 2011
Member
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 20:42 Go to previous messageGo to next message
h1055071 is currently offline h1055071Friend
Messages: 335
Registered: July 2009
Senior Member
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 22:12 Go to previous messageGo to next message
JeTBLaCK  is currently offline JeTBLaCK Friend
Messages: 41
Registered: March 2011
Member
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 22:12]

Report message to a moderator

Re: Show scroll on Graphical Editor [message #717154 is a reply to message #685944] Fri, 19 August 2011 12:50 Go to previous message
Karthikeyan Missing name is currently offline Karthikeyan Missing nameFriend
Messages: 47
Registered: July 2011
Member
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 05:00]

Report message to a moderator

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


Current Time: Thu Apr 25 12:55:43 GMT 2024

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

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

Back to the top