I'm not totally sure about the problem with interactors, but
one issue we recently fixed is that between Java 1.3 and 1.4
Sun seemed to modify the event handling.  We endeded up making
fixes to get context menus working for transitions in FSM.

The changes are somewhat complex, maybe you could try
downloading the HyVisual-5.0-alpha sources and working from there
http://ptolemy.eecs.berkeley.edu/hyvisual/

Files to look at would be:

ptolemy/vergil/{actor/LinkController,fsm/FSMViewerGraphController,fsm/TransitionController}.java
diva/canvas/event/MouseFilter.java

_Christopher

--------

    Hi ptolemy-hackers,
    
    I am creating a different view of the graph data structure held by an
    ActorGraphModel. The final goal is to get a sequence diagram-like
    representation of the communication structure between different actors. In
    this case there is no need for an extensive use of different icons because
    all actors can be rendered in the same way: you have a rectangle and a
    lifeline. The type can be shown as text. If I rendered actors like this and
    links as messages (StraightConnector with an ArrowHead) it would no longer
    be necessary to store this piece of information (the icon) in the model. It
    is not meant to create sequence diagrams out of every existing model (this
    wouldn't make a lot of sense ;) Instead of this it shall work the other way
    round. I want to create sequence diagrams, hold them in an ActorGraphModel
    (the representation as actors, ports and links) and finally save the model
    in a xml-file (because the whole thing is put inside of a
    TypedCompositeActor it shall finally be possible to use this actor in Vergi
   l
    with its basic representation through Vergil's standard icon used for
    TypedCompositeActors). Because there are only parts of Vergil needed, it
    might be enough to create a Controller based on ptolemy's
    BasicGraphController, a Frame based on BasicGraphFrame and a new Tableau
    that extends ptolemy's Tableau.
    
    Actually, I have some trouble with the interactors of the figures. They eve
   n
    handle events that shouldn't be handled by them. Drawing a message between
    two figures (from lifeline to lifeline) causes not only the message to be
    drawn but also the figures to be moved. The difference to Vergil is, that
    there is no port from where the message is drawn (at least not before the
    message is drawn; afterwards there will be a port, but this is only needed
    inside of the model, so there won't be a graphical representation but the
    line connecting the lifelines). One possible solution would be to get all
    the figures of the ForegroundLayer and set their interactors' _enabled-flag
    to false via setEnabled(boolean). Then there will only be one Interactor
    left on the pane => the one that will manage the message to be drawn. After
    the messages will be drawn the interactors of the figures must be enabled
    again. Do you have any other solutions or suggestions?
    
    Cheers, 
    Andreas

--------

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to