Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: [gef-users] MVC trouble or how to create edges

gef
Discussion topic

Back to topic list

Re: [gef-users] MVC trouble or how to create edges

Reply

Author jevopi
Full name Jens v. P.
Date 2005-02-09 06:17:31 PST
Message Hi,

answering myself (parts of my questions):

Use Layer.presentationFor(Object) for retrieving a figure associated
with a model object.
So it's possible to set source- and destination ports (and nodes):

     public FigEdge getFigEdgeFor(GraphModel i_gm, Layer i_lay, Object
i_edge,
             Map i_attributesMap) {
         MyEdge e = (MyEdge) i_edge;
         MyEdgeFigure fig = new MyEdgeFigure();
         fig.setOwner(i_edge);

         FigNode figNode = (FigNode)
i_lay.presentationFo​r(e.getSource());
         fig.setSourceFigNode(figNode);
         fig.setSourcePortFig(figNode);
         figNode = (FigNode) i_lay.presentationFo​r(e.getTarget());
         fig.setDestFigNode(figNode);
         fig.setDestPortFig(figNode);

         return fig;

     }

Regards,

Jens


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: users-unsubscribe@ge​f.tigris.org
For additional commands, e-mail: users-help at gef dot tigris dot org

« Previous message in topic | 5 of 5 | Next message in topic »

Messages

Show all messages in topic

[gef-users] MVC trouble or how to create edges jevopi Jens v. P. 2005-02-09 05:33:33 PST
     Re: [gef-users] MVC trouble or how to create edges bobtarling Bob Tarling 2005-02-09 06:14:54 PST
         Re: [gef-users] MVC trouble or how to create edges jevopi Jens v. P. 2005-02-09 07:55:33 PST
             Re: [gef-users] MVC trouble or how to create edges bobtarling Bob Tarling 2005-02-09 08:10:13 PST
     Re: [gef-users] MVC trouble or how to create edges jevopi Jens v. P. 2005-02-09 06:17:31 PST
Messages per page: