Tag Archives: graph

Creating a GEF Editor – Part 10: Deleting Connections and Fixing of Thing Delete Command

Previous Tutorial: Creating a GEF Editor – Part 9: Connections This tutorial continues the development of our OPM editor, adding a rarely useful functionality: deleting links (only used by dumb people like me who never get things right the first time ). Furthermore, we must fix the Command used to delete things, since it does not deal with links at all (try deleting a thing that has a connecting link). Let’s get to work. The code to delete an OPMLink is fairly similar to the code used to delete an OPMThing only that a ConnectionEditPart uses a EditPolicy.CONNECTION_ROLE and a … Continue reading

Posted in Programming | Tagged , , , , | 4 Comments

Creating a GEF Editor – Part 9: Connections

Previous Tutorial: Creating a GEF Editor – Part 8: Delete, Undo and Redo Having a functional editor on which we can add figures is already pretty neat, but we are still missing one very important element in our editor: connections. Connections are generally used to describe some kind of relation between different entities in the diagram, and are shown as lines that connect two different figures. In this tutorial you will learn how to add basic GEF connections, and if it doesn’t get too long, we’ll also add to them some extra functionality. This is going to be fun! Enjoy. … Continue reading

Posted in Programming | Tagged , , , | 8 Comments

Creating a GEF Editor – Part 8: Delete, Undo and Redo

Previous Tutorial: Creating a GEF Editor – Part 7: Moving Elements and Direct Editing In this tutorial we are going to add functionality to delete diagram entities and also to undo and redo editing operations. This is going to be a short tutorial because thankfully most of the functionality that we want to add only has to be configured in the framework. Delete functionality is implemented like all other functionality: we have to add a new Command to change the model, create a new EditPolicy (or extend an existing one) which creates the Command and install the command in the … Continue reading

Posted in Programming | Tagged , , , , | Leave a comment

Creating a GEF Editor – Part 6: Model Refactoring and Editing Diagram Entities

Previous Tutorial: Creating a GEF Editor – Part 5: Loading the Model from an EMF File We finished the last tutorial with a working “editor” on which not much editing could be done… So in this tutorial we’ll be adding some editing capabilities to the GEF editor. But before this, while preparing this tutorial I saw that doing some refactoring to the model we could reduce duplicate code, which is always good. So I did a full refactoring of the model, from which we will start this tutorial (I also renamed the ObjectProcessDiagram class to OPMObjectProcessDiagram for consistency). For your … Continue reading

Posted in Programming | Tagged , , , , , | 5 Comments

JGraph Styles

I build a reference program to test some of the styles that JGraphX provides. This is the result of the program: The full source code for this program follows:

Posted in Programming | Tagged , , | Leave a comment