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 186856 Details for
Bug 334439
Draw2D Examples do not compile on Draw2D 3.6.1
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]
A proposed patch
org.eclipse.draw2d.examples.patch (text/plain), 13.56 KB, created by
Zoltan Ujhelyi
on 2011-01-14 17:41:54 EST
(
hide
)
Description:
A proposed patch
Filename:
MIME Type:
Creator:
Zoltan Ujhelyi
Created:
2011-01-14 17:41:54 EST
Size:
13.56 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.draw2d.examples >Index: src/org/eclipse/draw2d/examples/cg/ObstructionExample.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/examples/org.eclipse.draw2d.examples/src/org/eclipse/draw2d/examples/cg/ObstructionExample.java,v >retrieving revision 1.7 >diff -u -r1.7 ObstructionExample.java >--- src/org/eclipse/draw2d/examples/cg/ObstructionExample.java 6 Sep 2010 17:59:07 -0000 1.7 >+++ src/org/eclipse/draw2d/examples/cg/ObstructionExample.java 14 Jan 2011 22:39:42 -0000 >@@ -66,13 +66,13 @@ > addMouseListener(new MouseListener.Stub() { > public void mousePressed(MouseEvent event) { > event.consume(); >- offset.setWidth(event.x - getLocation().x()); >- offset.setHeight(event.y - getLocation().y()); >+ offset.width = event.x - getLocation().x; >+ offset.height = event.y - getLocation().y; > } > > public void mouseReleased(MouseEvent event) { >- offset.setWidth(0); >- offset.setHeight(0); >+ offset.width = 0; >+ offset.height = 0; > if (event.button == 3) { > getParent().remove(oFigure); > getParent().remove(thisFigure); >@@ -95,8 +95,8 @@ > addMouseMotionListener(new MouseMotionListener.Stub() { > public void mouseDragged(MouseEvent event) { > Rectangle rect = getBounds().getCopy(); >- rect.setX(event.x - offset.width()); >- rect.setY(event.y - offset.height()); >+ rect.x = event.x - offset.width; >+ rect.y = event.y - offset.height; > setBounds(rect); > int index = 0; > if (isSource) { >@@ -105,7 +105,7 @@ > router.removePath(path); > paths.remove(path); > sourceList.remove(loc); >- loc = new Point(rect.x() + 10, rect.y() + 10); >+ loc = new Point(rect.x + 10, rect.y + 10); > sourceList.add(index, loc); > path = new Path(loc, (Point) targetList.get(index)); > router.addPath(path); >@@ -117,7 +117,7 @@ > router.removePath(path); > paths.remove(path); > targetList.remove(loc); >- loc = new Point(rect.x() + 10, rect.y() + 10); >+ loc = new Point(rect.x + 10, rect.y + 10); > targetList.add(index, loc); > path = new Path((Point) sourceList.get(index), loc); > router.addPath(path); >@@ -148,13 +148,13 @@ > addMouseListener(new MouseListener.Stub() { > public void mousePressed(MouseEvent event) { > event.consume(); >- offset.setWidth(event.x - getLocation().x()); >- offset.setHeight(event.y - getLocation().y()); >+ offset.width = event.x - getLocation().x; >+ offset.height = event.y - getLocation().y; > } > > public void mouseReleased(MouseEvent event) { >- offset.setWidth(0); >- offset.setHeight(0); >+ offset.width = 0; >+ offset.height = 0; > if (event.button == 3) { > getParent().remove(thisFigure); > router.removeObstacle((Rectangle) ObstructionExample.obstacleMap >@@ -167,8 +167,8 @@ > public void mouseDragged(MouseEvent event) { > > Rectangle rect = getBounds().getCopy(); >- rect.setX(event.x - offset.width()); >- rect.setY(event.y - offset.height()); >+ rect.x = event.x - offset.width; >+ rect.y = event.y - offset.height; > router.updateObstacle( > (Rectangle) ObstructionExample.obstacleMap > .get(thisFigure), rect); >@@ -183,9 +183,9 @@ > super.paint(graphics); > Rectangle b = getBounds(); > Point p = b.getCenter().translate(-22, -15); >- graphics.drawString("y:" + b.y() + "h:" + b.height(), p); >- p.setY(p.y() + 12); >- graphics.drawString("x:" + b.x() + "w:" + b.width(), p); >+ graphics.drawString("y:" + b.y + "h:" + b.height, p); >+ p.y = p.y + 12; >+ graphics.drawString("x:" + b.x + "w:" + b.width, p); > } > } > >@@ -211,7 +211,7 @@ > > public void mouseReleased(MouseEvent event) { > if (event.button == 1) { >- if (Math.abs(pPoint.x() - event.getLocation().x()) > 10) { >+ if (Math.abs(pPoint.x - event.getLocation().x) > 10) { > DragFigure f = new DragFigure(); > add(f); > >@@ -229,9 +229,9 @@ > targetList.add(event.getLocation()); > EllipseDragFigure eFigure = new EllipseDragFigure( > event.getLocation(), false); >- eFigure.setBounds(new Rectangle(event.getLocation() >- .x() - 10, event.getLocation().y() - 10, >- 20, 20)); >+ eFigure.setBounds(new Rectangle( >+ event.getLocation().x - 10, event >+ .getLocation().y - 10, 20, 20)); > add(eFigure); > firstPointCreated = false; > figure.addOtherFigure(eFigure); >@@ -250,9 +250,9 @@ > pressPoint = event.getLocation(); > EllipseDragFigure eFigure = new EllipseDragFigure( > event.getLocation(), true); >- eFigure.setBounds(new Rectangle(event.getLocation() >- .x() - 10, event.getLocation().y() - 10, >- 20, 20)); >+ eFigure.setBounds(new Rectangle( >+ event.getLocation().x - 10, event >+ .getLocation().y - 10, 20, 20)); > add(eFigure); > figure = eFigure; > firstPointCreated = true; >Index: src/org/eclipse/draw2d/examples/graph/AbstractGraphDemo.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/examples/org.eclipse.draw2d.examples/src/org/eclipse/draw2d/examples/graph/AbstractGraphDemo.java,v >retrieving revision 1.7 >diff -u -r1.7 AbstractGraphDemo.java >--- src/org/eclipse/draw2d/examples/graph/AbstractGraphDemo.java 6 Sep 2010 17:59:06 -0000 1.7 >+++ src/org/eclipse/draw2d/examples/graph/AbstractGraphDemo.java 14 Jan 2011 22:39:43 -0000 >@@ -83,7 +83,7 @@ > Point p; > p = getOwner().getBounds().getCenter(); > getOwner().translateToAbsolute(p); >- if (reference.x() < p.x()) >+ if (reference.x < p.x) > p = getOwner().getBounds().getLeft(); > else > p = getOwner().getBounds().getRight(); >Index: src/org/eclipse/draw2d/examples/path/PathExample.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/examples/org.eclipse.draw2d.examples/src/org/eclipse/draw2d/examples/path/PathExample.java,v >retrieving revision 1.2 >diff -u -r1.2 PathExample.java >--- src/org/eclipse/draw2d/examples/path/PathExample.java 6 Sep 2010 17:59:07 -0000 1.2 >+++ src/org/eclipse/draw2d/examples/path/PathExample.java 14 Jan 2011 22:39:43 -0000 >@@ -40,7 +40,7 @@ > fig.setLayoutManager(new ToolbarLayout()); > > final ScrollBar bar = new ScrollBar(); >- final Label l = new Label("«Zoom»"); >+ final Label l = new Label("�Zoom�"); > > l.setBorder(new SchemeBorder(ButtonBorder.SCHEMES.BUTTON_SCROLLBAR)); > bar.setThumb(l); >@@ -70,7 +70,7 @@ > polyline.setClosed(true); > > Point c = polyline.getBounds().getCenter(); >- polyline.setRotation(c.x(), c.y(), 45); >+ polyline.setRotation(c.x, c.y, 45); > zoomFigure.add(polyline, BorderLayout.CENTER); > > bar.addPropertyChangeListener("value", new PropertyChangeListener() { >Index: src/org/eclipse/draw2d/examples/path/PathFigure.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/examples/org.eclipse.draw2d.examples/src/org/eclipse/draw2d/examples/path/PathFigure.java,v >retrieving revision 1.2 >diff -u -r1.2 PathFigure.java >--- src/org/eclipse/draw2d/examples/path/PathFigure.java 6 Sep 2010 17:59:07 -0000 1.2 >+++ src/org/eclipse/draw2d/examples/path/PathFigure.java 14 Jan 2011 22:39:43 -0000 >@@ -90,12 +90,12 @@ > double angle = degreesToRadians(degrees); > double cos = (double) Math.cos(angle), sin = (double) Math.sin(angle); > >- PrecisionPoint p1 = getRotatedPoint(points.getFirstPoint().x(), points >- .getFirstPoint().y(), cos, sin); >+ PrecisionPoint p1 = getRotatedPoint(points.getFirstPoint().x, >+ points.getFirstPoint().y, cos, sin); > path.moveTo((float) p1.preciseX(), (float) p1.preciseY()); > for (int i = 1; i < points.size(); i++) { >- PrecisionPoint p = getRotatedPoint(points.getPoint(i).x(), points >- .getPoint(i).y(), cos, sin); >+ PrecisionPoint p = getRotatedPoint(points.getPoint(i).x, >+ points.getPoint(i).y, cos, sin); > path.lineTo((float) p.preciseX(), (float) p.preciseY()); > } > if (isClosed()) >@@ -112,14 +112,14 @@ > if (degrees == 0) > return p; > >- p.setPreciseX(p.preciseX() - cx); >- p.setPreciseY(p.preciseY() - cy); >+ p.preciseX -= cx; >+ p.preciseY -= cy; > > float x1 = (float) (p.preciseX() * cos - p.preciseY() * sin); > float y1 = (float) (p.preciseY() * cos + p.preciseX() * sin); > >- p.setPreciseX(x1 + cx); >- p.setPreciseY(y1 + cy); >+ p.preciseX = x1 + cx; >+ p.preciseY = y1 + cy; > return p; > } > >@@ -131,12 +131,12 @@ > double angle = degreesToRadians(degrees); > double cos = (double) Math.cos(angle), sin = (double) Math > .sin(angle); >- PrecisionPoint p1 = getRotatedPoint(points.getFirstPoint().x(), >- points.getFirstPoint().y(), cos, sin); >+ PrecisionPoint p1 = getRotatedPoint(points.getFirstPoint().x, >+ points.getFirstPoint().y, cos, sin); > bounds.setLocation(p1); > for (int i = 1; i < points.size(); i++) { >- PrecisionPoint p = getRotatedPoint(points.getPoint(i).x(), >- points.getPoint(i).y(), cos, sin); >+ PrecisionPoint p = getRotatedPoint(points.getPoint(i).x, >+ points.getPoint(i).y, cos, sin); > bounds.union(p); > } > } >Index: src/org/eclipse/draw2d/examples/thumbnail/ThumbnailExample.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/examples/org.eclipse.draw2d.examples/src/org/eclipse/draw2d/examples/thumbnail/ThumbnailExample.java,v >retrieving revision 1.4 >diff -u -r1.4 ThumbnailExample.java >--- src/org/eclipse/draw2d/examples/thumbnail/ThumbnailExample.java 6 Sep 2010 17:59:07 -0000 1.4 >+++ src/org/eclipse/draw2d/examples/thumbnail/ThumbnailExample.java 14 Jan 2011 22:39:43 -0000 >@@ -83,20 +83,20 @@ > figure1.setBounds(new Rectangle(50, 50, 200, 200)); > figure1.addMouseListener(new MouseListener.Stub() { > public void mousePressed(MouseEvent event) { >- offset.setWidth(event.x - figure1.getLocation().x()); >- offset.setHeight(event.y - figure1.getLocation().y()); >+ offset.width = event.x - figure1.getLocation().x; >+ offset.height = event.y - figure1.getLocation().y; > } > > public void mouseReleased(MouseEvent event) { >- offset.setWidth(0); >- offset.setHeight(0); >+ offset.width = 0; >+ offset.height = 0; > } > }); > figure1.addMouseMotionListener(new MouseMotionListener.Stub() { > public void mouseDragged(MouseEvent event) { > Rectangle rect = figure1.getBounds().getCopy(); >- rect.setX(event.x - offset.width()); >- rect.setY(event.y - offset.height()); >+ rect.x = event.x - offset.width; >+ rect.y = event.y - offset.height; > figure1.setBounds(rect); > } > }); >@@ -106,20 +106,20 @@ > figure2.setBounds(new Rectangle(350, 350, 150, 200)); > figure2.addMouseListener(new MouseListener.Stub() { > public void mousePressed(MouseEvent event) { >- offset.setWidth(event.x - figure2.getLocation().x()); >- offset.setHeight(event.y - figure2.getLocation().y()); >+ offset.width = event.x - figure2.getLocation().x; >+ offset.height = event.y - figure2.getLocation().y; > } > > public void mouseReleased(MouseEvent event) { >- offset.setWidth(0); >- offset.setHeight(0); >+ offset.width = 0; >+ offset.height = 0; > } > }); > figure2.addMouseMotionListener(new MouseMotionListener.Stub() { > public void mouseDragged(MouseEvent event) { > Rectangle rect = figure2.getBounds().getCopy(); >- rect.setX(event.x - offset.width()); >- rect.setY(event.y - offset.height()); >+ rect.x = event.x - offset.width; >+ rect.y = event.y - offset.height; > figure2.setBounds(rect); > } > }); >Index: src/org/eclipse/draw2d/examples/tree/HangingLayout.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/examples/org.eclipse.draw2d.examples/src/org/eclipse/draw2d/examples/tree/HangingLayout.java,v >retrieving revision 1.8 >diff -u -r1.8 HangingLayout.java >--- src/org/eclipse/draw2d/examples/tree/HangingLayout.java 6 Sep 2010 17:59:06 -0000 1.8 >+++ src/org/eclipse/draw2d/examples/tree/HangingLayout.java 14 Jan 2011 22:39:43 -0000 >@@ -127,7 +127,7 @@ > IFigure node = branch.getNode(); > IFigure contents = branch.getContentsPane(); > int x = node.getBounds().right(); >- int y = node.getBounds().y() + gap; >+ int y = node.getBounds().y + gap; > List children = contents.getChildren(); > if (children.size() == 0) > return; >@@ -135,15 +135,15 @@ > for (int i = 0; i < children.size(); i++) { > Point pt = ((TreeBranch) children.get(i)).getNodeBounds() > .getTop(); >- g.drawLine(pt.x(), y, pt.x(), pt.y()); >- right = Math.max(right, pt.x()); >+ g.drawLine(pt.x, y, pt.x, pt.y); >+ right = Math.max(right, pt.x); > } > g.drawLine(x, y, right, y); > > } else { > IFigure node = branch.getNode(); > IFigure contents = branch.getContentsPane(); >- int x = node.getBounds().x() + gap; >+ int x = node.getBounds().x + gap; > int y = node.getBounds().bottom(); > List children = contents.getChildren(); > if (children.size() == 0) >@@ -152,8 +152,8 @@ > for (int i = 0; i < children.size(); i++) { > Point pt = ((TreeBranch) children.get(i)).getNodeBounds() > .getLeft(); >- g.drawLine(x, pt.y(), pt.x(), pt.y()); >- bottom = Math.max(bottom, pt.y()); >+ g.drawLine(x, pt.y, pt.x, pt.y); >+ bottom = Math.max(bottom, pt.y); > } > g.drawLine(x, y, x, bottom); > } >@@ -172,7 +172,7 @@ > Rectangle nodeBounds = transposer.t(branch.getNodeBounds()); > int rightEdge = clientArea.right(); > >- cachedContourLeft[0] = nodeBounds.x() - clientArea.x(); >+ cachedContourLeft[0] = nodeBounds.x - clientArea.x; > cachedContourRight[0] = rightEdge - nodeBounds.right(); > > if (!branch.isExpanded())
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 334439
: 186856