Diagram with timed events on horizontal lines [message #497124] |
Thu, 12 November 2009 14:40 |
Chris Lott Messages: 1 Registered: November 2009 |
Junior Member |
|
|
Hi, I am writing to ask for hints and pointers for getting started with a new editor. I'm not new to GEF, but I am new to GMF. I'm trying to avoid all the dogwork of creating a GEF editor by sitting on top of GMF.
I would like to create a graphical editor to show and manipulate timed events. Think about controlling a strand of lights (it's close to Christmas :-). I have in mind a picture vaguely like Apple's garage band, in which multiple tracks are shown on horizontal lines. I am thinking one horizontal line for each light strand, with time t-zero at the left and increasing to the right. I would like to put the on-off events on top of each line. So if I have 3 lights to control the editor would show something like this:
1 -----[|||||]-------[||||||]------------------
2 ----------[|||||]-----[|||||]----------------
3 ----------------------------------------------
0....1.....2.....3.....4.....5.....6.....7.....8 (scale that is not editable)
This diagram represents the following data: strand 1 lights up and goes off, strand 2 lights up and goes off, etc; strand 3 never lights up at all. I want the editor to support adding/removing a light, adding/removing events to a light, and dragging the events left/right. A light might have a label. Each event has properties like brightness, start time, end time; maybe a label. That's about it.
Unlike so many examples I have seen, I don't want a canvas that allows the user to add a light just anywhere; all lines should remain equidistant and parallel. Events should only be added to existing horizontal lines, not dropped anywhere on the canvas. I also have no use for links between diagram elements, which I know ignores much GMF/GEF power. I suspect I need some sort of snap-to layout, because events should sit right on the line.
I built an EMF model starting with annotated Java interfaces, basically I have a collection of lights, and each light has a collection of events. So far so good. Now I'm working thru the GMF tutorial and have reached the tooling definition.
I suspect that I mostly need help with layout code/models, but since I'm so new to GMF I am not sure I'm asking the right questions yet. I welcome any hints, tips, and pointers. Thanks in advance!!
|
|
|
|
Powered by
FUDForum. Page generated in 0.02139 seconds