Author: dazarov
Date: 2008-05-30 07:02:21 -0400 (Fri, 30 May 2008)
New Revision: 8453
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1189
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-05-30
10:01:41 UTC (rev 8452)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-05-30
11:02:21 UTC (rev 8453)
@@ -39,12 +39,6 @@
public class PageEditPart extends PagesEditPart implements PropertyChangeListener,
EditPartListener, Adapter {
private PageFigure fig = null;
- private boolean single = true;
-
- public boolean isSingle() {
- return single;
- }
-
public void doControlUp() {
}
@@ -181,20 +175,14 @@
public ConnectionAnchor getSourceConnectionAnchor(
ConnectionEditPart connEditPart) {
- if (single) {
Link link = (Link) connEditPart.getModel();
int index = getPageModel().getOutputLinks().indexOf(link);
return getNodeFigure().getConnectionAnchor((index + 1) + "_OUT");
- } else
- return super.getSourceConnectionAnchor(connEditPart);
}
public ConnectionAnchor getSourceConnectionAnchor(Request request) {
- if (single) {
Point pt = new Point(((DropRequest) request).getLocation());
return getNodeFigure().getSourceConnectionAnchorAt(pt);
- } else
- return super.getSourceConnectionAnchor(request);
}
protected List getModelChildren() {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java 2008-05-30
10:01:41 UTC (rev 8452)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java 2008-05-30
11:02:21 UTC (rev 8453)
@@ -117,13 +117,12 @@
public void addConnectionAnchor(int number) {
FixedConnectionAnchor c;
- if (number == 1)
- return;
+ //if (number == 1)
+ //return;
c = new FixedConnectionAnchor(this);
- c.offsetV = 32 + LINK_HEIGHT * (number - 1);
- // c.offsetH = -1;
+ c.offsetV = 32 + LINK_HEIGHT * number;
c.leftToRight = false;
- connectionAnchors.put(number + "_OUT", c);
+ connectionAnchors.put((number + 1) + "_OUT", c);
outputConnectionAnchors.addElement(c);
}
@@ -164,7 +163,14 @@
}
}
-
+ public ConnectionAnchor getConnectionAnchor(String terminal) {
+ ConnectionAnchor anchor = (ConnectionAnchor)connectionAnchors.get(terminal);
+ while(anchor == null){
+ addConnectionAnchor(outputConnectionAnchors.size());
+ anchor = (ConnectionAnchor)connectionAnchors.get(terminal);
+ }
+ return anchor;
+ }
/**
* @see org.eclipse.gef.handles.HandleBounds#getHandleBounds()
*/
@@ -261,6 +267,8 @@
g.fillPolygon(shadowPointlist);
g.fillPolygon(shadow2Pointlist);
+
+
}
class GroupBorder extends LineBorder {