Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8481995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:42:38+00:00 2026-06-10T19:42:38+00:00

I have a GEF Editor with the following RootEditPart . public class MyProjectEditPart extends

  • 0

I have a GEF Editor with the following RootEditPart.

public class MyProjectEditPart extends AbstractGraphicalEditPart {

@Override
protected IFigure createFigure() {
    ScalableFreeformLayeredPane layer = new ScalableFreeformLayeredPane();
    layer.setLayoutManager(new FreeformLayout());
    return layer;
  }

I’m using the editor to create a bottom-up tree:

     _7_
    /   \
   5     6
  / \   / \
 1   2 3   4 

1-7 are Rectangles, where 1-4 represent different model elements than 5-7. At the moment, all figures are laid out by foot (new Rectangle(x, y, w, h) + parent.setConstraint(this, figure, rectangle)). The position of figures 5-7 is calculated with a simple algorithm, based on the position on figures 1-4.

For the sake of practicality I’d like to be able to simply add 1-4 to a FlowLayouted Figure at the BorderLayout.BOTTOM of the RootFigure, and add the rest of the figures to the RootFigure’s BorderLayout.CENTER.

However, I’m pretty new to GEF and can’t get my head around how to do it. I fail to find the right method for adding the figures 1-4 in their respective EditPart‘s createFigure().

For example, I’ve tried stuff like parent.getFigure().getChildren().get(0).add(Figure_1) for example, with the RootEditPart’s createFigure() method adding two new figures to BorderLayout.BOTTOM and CENTER respectively..

I’d be thankful for any starting points :).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:42:40+00:00Added an answer on June 10, 2026 at 7:42 pm

    You need an EditPartFactory which “dispatches” the model elements to different EditParts.
    The toplevel editpart (7) should then implement getModelChildren to return the 5 and 6, whose editparts in turn should return as children the 1,2 and 3,4.

    How about taking some time the GEF shape example and/or with http://www.redbooks.ibm.com/abstracts/sg246302.html ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created the following class that extends JSpinner to iterate over dd/mm/yyy values.
I have a GEF Editor with a Command to create a new node. I
I have a basic GEF editor where I want to use the model from
I have a Joomla 1.5 component that uses a call to the editor class
I have a GEF editor which represent a finite state machine. Editor's input (and
I am developing BPMN2 Editor using GEF. I have BPMN2 EMF Models. When I
I have created one small GEF project which contains the GEF editor. Now I
I have added a ColorPropertyDescriptor to the Shapes example in GEF, however this displays
have written this little class, which generates a UUID every time an object of
Have following listener for keyboard ArrowDown event(it's key code is 40 ): window.onload =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.