diff options
author | Andre Dietisheim | 2010-03-18 08:52:35 +0000 |
---|---|---|
committer | Andre Dietisheim | 2010-03-18 08:52:35 +0000 |
commit | a51e099d75fd3dbd1deb585764cb7bb9e6f2186f (patch) | |
tree | ba4a503a46e722ec798bb8711e3729dad0f7caee /plugins/org.eclipse.emf.cdo.ui.branch/src/org | |
parent | a60b23fc6c55dd77e34fe843acfcc98f1756903c (diff) | |
download | cdo-a51e099d75fd3dbd1deb585764cb7bb9e6f2186f.tar.gz cdo-a51e099d75fd3dbd1deb585764cb7bb9e6f2186f.tar.xz cdo-a51e099d75fd3dbd1deb585764cb7bb9e6f2186f.zip |
[256624] [UI] Create a Commit History ViewPart
https://bugs.eclipse.org/bugs/show_bug.cgi?id=256624
fixe tree location
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.ui.branch/src/org')
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui.branch/src/org/eclipse/emf/cdo/ui/internal/branch/geometry/GeometryUtils.java b/plugins/org.eclipse.emf.cdo.ui.branch/src/org/eclipse/emf/cdo/ui/internal/branch/geometry/GeometryUtils.java index e6e4d30ce8..5a76cd3cc6 100644 --- a/plugins/org.eclipse.emf.cdo.ui.branch/src/org/eclipse/emf/cdo/ui/internal/branch/geometry/GeometryUtils.java +++ b/plugins/org.eclipse.emf.cdo.ui.branch/src/org/eclipse/emf/cdo/ui/internal/branch/geometry/GeometryUtils.java @@ -160,19 +160,19 @@ public class GeometryUtils } /** - * Subtracts the given height and width from the given rectangle. + * Subtracts the given height and width from the given rectangle and move its origin by the half of the given values. * * @param dimension * the dimension * @param rectangle * the rectangle */ - public static DisplayIndependentRectangle substract(DisplayIndependentDimension dimension, + public static DisplayIndependentRectangle substractBorder(DisplayIndependentDimension dimension, DisplayIndependentRectangle rectangle) { DisplayIndependentRectangle newRectangle = new DisplayIndependentRectangle(); - newRectangle.x = dimension.width; - newRectangle.y = dimension.height; + newRectangle.x = rectangle.x + dimension.width / 2; + newRectangle.y = rectangle.y + dimension.height / 2; newRectangle.width = rectangle.width - dimension.width; newRectangle.height = rectangle.height - dimension.height; return newRectangle; diff --git a/plugins/org.eclipse.emf.cdo.ui.branch/src/org/eclipse/emf/cdo/ui/internal/branch/layout/BranchTreeLayoutAlgorithm.java b/plugins/org.eclipse.emf.cdo.ui.branch/src/org/eclipse/emf/cdo/ui/internal/branch/layout/BranchTreeLayoutAlgorithm.java index ee0987b0b8..e61608544b 100644 --- a/plugins/org.eclipse.emf.cdo.ui.branch/src/org/eclipse/emf/cdo/ui/internal/branch/layout/BranchTreeLayoutAlgorithm.java +++ b/plugins/org.eclipse.emf.cdo.ui.branch/src/org/eclipse/emf/cdo/ui/internal/branch/layout/BranchTreeLayoutAlgorithm.java @@ -125,7 +125,7 @@ public class BranchTreeLayoutAlgorithm extends AbstractLayoutAlgorithm private void fitWithinBounds(BranchView branchView) { - DisplayIndependentRectangle boundsWithBorder = GeometryUtils.substract(borders, layoutBounds); + DisplayIndependentRectangle boundsWithBorder = GeometryUtils.substractBorder(borders, layoutBounds); branchView.getLayoutStrategy().scale(branchView, boundsWithBorder); } |