Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Custom compound figure / accessors
Custom compound figure / accessors [message #170609] Wed, 30 January 2008 05:22 Go to next message
Jelle Herold is currently offline Jelle HeroldFriend
Messages: 42
Registered: July 2009
Member
Hi,

Suppose I have a Custom Figure containing another figure (a label).

class MyFigure extends Figure {
// ...
Label getContainedLabel() { //... };
}

How would I access that figure (like with Child Access) to use it as
say a Diagram Label?

Thanks,
Jelle.
Re: Custom compound figure / accessors [message #170687 is a reply to message #170609] Wed, 30 January 2008 10:47 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Jelle,

You have to create:
- Custom figure in your figure descriptor
- Figure accessor in this figure descriptor with the accessor property set
to "getContainedLabel"
- Custom figure in this Fgiure Accessor with Qualified Class Name "org.eclipse.draw2d.Label"
(you can create Label figure instead if you change return type of getContainedLabel
to WrapLabel)
- FigureAccessor in the parent figure descriptor. This accessor should reference
inner label custom figure (child of Fgiure Accessor) as a Figure.

As a result you should be able to use child label of the Custom figure in
a label mapping via corresponding FigureAccessor.

-----------------
Alex Shatalin
Previous Topic:custom figure with getHandleBounds()
Next Topic:Creating my own figure
Goto Forum:
  


Current Time: Fri Apr 19 21:07:34 GMT 2024

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

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

Back to the top