Diagram editing prototype
Download diagram.ijs | diagram_pret.ijs (j601 pre-t)
- Draws boxes for items with shadow, title, list of members
- Draws connector lines dynamically between items
- Drags items dynamically updating
- Dragged item is selected with border and shadow style
Implementation details (available j601 beta t)
uses glwindoworg for local item coordinates
uses wd 'setinvalid id' for update invoking paint
Notes:
gl2 (both Windows and Java) incorrectly offsets glpaint by glwindoworg, so explicit glwindoworg 0 0 has to be done
Java (esp. Mac) setinvalid is slower and jerky, but direct call to paint is fast.
Direct paint requires glpaint, whereas initial paint (wd 'pshow') and setinvalid do not: this is because system does not know when you are done painting. So the usage pattern for ad hoc painting should be: glpaint @ f_g_paint.
See Also
programming/2006-August/002983 Drawing program in J
BlueJ aa integrated Java environment with diagrams and automatic code generation
