Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Custom compound figure / accessors
Custom compound figure / accessors [message #170609] Wed, 30 January 2008 00:22 Go to next message
Eclipse UserFriend
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 05:47 Go to previous message
Eclipse UserFriend
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: Sat Jul 05 05:59:20 EDT 2025

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