1 /*
2 WSMO Studio - a Semantic Web Service Editor
3 Copyright (c) 2004-2007, Ontotext Lab. / SIRMA Group
4
5 This library is free software; you can redistribute it and/or modify it under
6 the terms of the GNU Lesser General Public License as published by the Free
7 Software Foundation; either version 2.1 of the License, or (at your option)
8 any later version.
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 details.
13 You should have received a copy of the GNU Lesser General Public License along
14 with this library; if not, write to the Free Software Foundation, Inc.,
15 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 */
17
18 /***
19 * <p>Title: WSMO Studio</p>
20 * <p>Description: Semantic Web Service Editor</p>
21 * <p>Copyright: Copyright (c) 2004-2007</p>
22 * <p>Company: Ontotext Lab. / SIRMA </p>
23 */
24
25 package org.wsmostudio.bpmo.ui.editor.editpart;
26
27 import org.eclipse.gef.ConnectionEditPart;
28 import org.eclipse.gef.EditPart;
29 import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
30
31 public abstract class WorkflowEditPart extends AbstractGraphicalEditPart {
32
33 protected AbstractGraphicalEditPart owner;
34
35 public WorkflowEditPart(EditPart iContext) {
36 super();
37 this.owner = (iContext instanceof AbstractGraphicalEditPart) ?
38 (AbstractGraphicalEditPart)iContext
39 : null;
40 }
41
42 public AbstractGraphicalEditPart getContainerPart() {
43 return this.owner;
44 }
45
46 /***
47 * @see org.eclipse.gef.editparts.AbstractEditPart#createConnection(Object)
48 */
49 protected ConnectionEditPart createConnection(Object iModel)
50 {
51 ConnectionEditPart connectPart =
52 GraphicalPartFactory.createConnectionPart(iModel, getContainerPart());
53 connectPart.setModel(iModel);
54 return connectPart;
55 }
56 }
57 /*
58 * $Log$
59 * Revision 1.2 2007/09/15 14:23:18 alex_simov
60 * general rework
61 *
62 * Revision 1.1 2007/08/07 13:41:04 alex_simov
63 * Connections have rounded edges (with Manhattan routing style)
64 *
65 *
66 */