Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 190608 Details for
Bug 154380
Subgraph doesn't obey Graph's direction if EAST
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for CompoundDirectedGraphLayout, using CompoundTransposeMetrics
154380.txt (text/plain), 2.92 KB, created by
Alexander Nyßen
on 2011-03-07 18:00:21 EST
(
hide
)
Description:
Patch for CompoundDirectedGraphLayout, using CompoundTransposeMetrics
Filename:
MIME Type:
Creator:
Alexander Nyßen
Created:
2011-03-07 18:00:21 EST
Size:
2.92 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.draw2d >Index: src/org/eclipse/draw2d/graph/CompoundDirectedGraphLayout.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.draw2d/src/org/eclipse/draw2d/graph/CompoundDirectedGraphLayout.java,v >retrieving revision 1.19 >diff -u -r1.19 CompoundDirectedGraphLayout.java >--- src/org/eclipse/draw2d/graph/CompoundDirectedGraphLayout.java 19 May 2010 20:28:19 -0000 1.19 >+++ src/org/eclipse/draw2d/graph/CompoundDirectedGraphLayout.java 7 Mar 2011 22:55:19 -0000 >@@ -40,7 +40,7 @@ > public final class CompoundDirectedGraphLayout extends DirectedGraphLayout { > > void init() { >- steps.add(new TransposeMetrics()); >+ steps.add(new CompoundTransposeMetrics()); > steps.add(new CompoundBreakCycles()); > steps.add(new RouteEdges()); > steps.add(new ConvertCompoundGraph()); >Index: src/org/eclipse/draw2d/graph/CompoundTransposeMetrics.java >=================================================================== >RCS file: src/org/eclipse/draw2d/graph/CompoundTransposeMetrics.java >diff -N src/org/eclipse/draw2d/graph/CompoundTransposeMetrics.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/draw2d/graph/CompoundTransposeMetrics.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,53 @@ >+/******************************************************************************* >+ * Copyright (c) 2005, 2010 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.draw2d.graph; >+ >+import org.eclipse.draw2d.PositionConstants; >+ >+class CompoundTransposeMetrics extends TransposeMetrics { >+ >+ public void visit(DirectedGraph g) { >+ if (g.getDirection() == PositionConstants.SOUTH) >+ return; >+ super.visit(g); >+ int temp; >+ CompoundDirectedGraph cg = (CompoundDirectedGraph) g; >+ for (int i = 0; i < cg.subgraphs.size(); i++) { >+ Node node = cg.subgraphs.getNode(i); >+ temp = node.width; >+ node.width = node.height; >+ node.height = temp; >+ if (node.getPadding() != null) >+ node.setPadding(t.t(node.getPadding())); >+ } >+ } >+ >+ public void revisit(DirectedGraph g) { >+ if (g.getDirection() == PositionConstants.SOUTH) >+ return; >+ super.revisit(g); >+ int temp; >+ CompoundDirectedGraph cg = (CompoundDirectedGraph) g; >+ for (int i = 0; i < cg.subgraphs.size(); i++) { >+ Node node = (Node) cg.subgraphs.get(i); >+ temp = node.width; >+ node.width = node.height; >+ node.height = temp; >+ temp = node.y; >+ node.y = node.x; >+ node.x = temp; >+ if (node.getPadding() != null) >+ node.setPadding(t.t(node.getPadding())); >+ } >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 154380
:
48195
| 190608