Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » customized border or little fig (need to have a small symbol in the corner of my node)
customized border or little fig [message #1027756] Wed, 27 March 2013 11:28 Go to next message
Mokhtar Abdu is currently offline Mokhtar AbduFriend
Messages: 104
Registered: November 2011
Senior Member
Hi,

How can one draw a small figure on a corner of a graphnode? Say on the border providing that it is clickable. I need to have a place to put some number and when user clicks this little figure some dialog opens.

Thanks a lot!
Mok
Re: customized border or little fig [message #1027785 is a reply to message #1027756] Wed, 27 March 2013 12:07 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 222
Registered: July 2009
Senior Member
Hi,

you have to use custom figures. See the http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples/src/org/eclipse/gef4/zest/examples/jface/CustomFigureJFaceSnippet.java and the UML example (http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples/src/org/eclipse/gef4/zest/examples/uml) for details.

Cheers,
Zoltán
Re: customized border or little fig [message #1027964 is a reply to message #1027785] Wed, 27 March 2013 16:51 Go to previous messageGo to next message
Mokhtar Abdu is currently offline Mokhtar AbduFriend
Messages: 104
Registered: November 2011
Senior Member
Thank you Zoltán, but i need something little moreadvanced. My node looks like a square and has a customed figure already. What i want is little circlized label on the corner of the border. Is this possible?

Thank you
Mok
Re: customized border or little fig [message #1027969 is a reply to message #1027964] Wed, 27 March 2013 16:58 Go to previous message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 222
Registered: July 2009
Senior Member
Hi,

a Figure can contain any number of other figures, so yes, it is possible. Create a composite figure, and add your circlized label on it. Look for Draw2d examples for details (http://nyssen.blogspot.hu/2010/12/draw2d-examples-hidden-treasure.html)

Zoltán
Previous Topic:GEF update site not available
Next Topic:Method #getAdapter(Class) not get IContentOutlinePage
Goto Forum:
  


Current Time: Mon Dec 22 02:09:31 GMT 2014

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

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