[piccolo2d-dev] Issue 260 in piccolo2d: Missplaced underlines in PStyledText
Status: New Owner: New issue 260 by jless...@gmx.de: Missplaced underlines in PStyledText https://code.google.com/p/piccolo2d/issues/detail?id=260 What steps will reproduce the problem? 1. Create a PStyledText with a DefaultStyledDocument 2. Add a default-styled string to the document 3. Append a string with underline styling to the document What is the expected output? What do you see instead? I would expect the second string to be displayed with an underline. Instead the first string is underlined. The line has the length of the second string, i.e. the underline is missplaced What version of the product are you using? On what operating system? 3.0, Windows 7 See the attached patch file for a fix. Attachments: PStyledText.java.underline.patch 605 bytes -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Issue 261 in piccolo2d: PStyledText too closed for extension in derivations
Status: New Owner: New issue 261 by jless...@gmx.de: PStyledText too closed for extension in derivations https://code.google.com/p/piccolo2d/issues/detail?id=261 I needed support for dotted underlines in a PStyledText but wasn't able to add appropriate functionality. In fact it would have been quite easy to add the functionality in a derived class if PStyledText were a bit more open for overrides in derivations. Please consider the attached patch as an improvement. It does not change the existing functionality but just opens it a bit by - Making some methods protected instead of private - Separating some code blocks in protected template methods - Adding getters to inner classes - Encapsulating the construction of SegmentInfo in a method to allow derived classes providing an extended type instead Attachments: PStyledText.java.patch 5.5 KB -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Issue 262 in piccolo2d: Provide access to getPropertyChangeListeners from PNode
Status: New Owner: New issue 262 by jeffyosh...@yahoo.com: Provide access to getPropertyChangeListeners from PNode https://code.google.com/p/piccolo2d/issues/detail?id=262 What steps will reproduce the problem? 1. Create a class that uses a PNode 2. Try to find out how many property change listeners are registered to it 3. You can't, because that information is not visible. What version of the product are you using? On what operating system? Piccolo 3.0. Please provide any additional information below. Discussed this via email with Michael Heuer. He suggests that following, which sounds good to me: "I could add methods on PNode that delegate to http://docs.oracle.com/javase/7/docs/api/java/beans/PropertyChangeSupport.html#getPropertyChangeListeners%28%29 http://docs.oracle.com/javase/7/docs/api/java/beans/PropertyChangeSupport.html#getPropertyChangeListeners(java.lang.String)" -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Re: Issue 260 in piccolo2d: Missplaced underlines in PStyledText
Updates: Status: Accepted Owner: heue...@gmail.com Labels: Type-Defect Priority-High Effort-Low OpSys-All Toolkit-Piccolo2D.Java Component-Extras Comment #1 on issue 260 by heue...@gmail.com: Missplaced underlines in PStyledText https://code.google.com/p/piccolo2d/issues/detail?id=260 (No comment was entered for this change.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Re: Issue 261 in piccolo2d: PStyledText too closed for extension in derivations
Updates: Status: Accepted Owner: heue...@gmail.com Labels: Type-Enhancement Priority-High Effort-Medium OpSys-All Toolkit-Piccolo2D.Java Component-Extras Comment #1 on issue 261 by heue...@gmail.com: PStyledText too closed for extension in derivations https://code.google.com/p/piccolo2d/issues/detail?id=261 (No comment was entered for this change.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Re: Issue 262 in piccolo2d: Provide access to getPropertyChangeListeners from PNode
Updates: Status: Accepted Owner: heue...@gmail.com Labels: Type-Enhancement Priority-High Effort-Low OpSys-All Toolkit-Piccolo2D.Java Component-Core Comment #1 on issue 262 by heue...@gmail.com: Provide access to getPropertyChangeListeners from PNode https://code.google.com/p/piccolo2d/issues/detail?id=262 (No comment was entered for this change.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Re: Issue 58 in piccolo2d: Create a Piccolo2D application archetype
Updates: Status: WontFix Comment #6 on issue 58 by heue...@gmail.com: Create a Piccolo2D application archetype https://code.google.com/p/piccolo2d/issues/detail?id=58 (No comment was entered for this change.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Issue 263 in piccolo2d: PPath.createPolyline method are missing from versions 2 and later
Status: New Owner: New issue 263 by heue...@gmail.com: PPath.createPolyline method are missing from versions 2 and later https://code.google.com/p/piccolo2d/issues/detail?id=263 PPath.createPolyline method are missing from versions 2 and later, e.g. https://code.google.com/p/piccolo2d/source/browse/piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/nodes/PPath.java#435 -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Re: Issue 259 in piccolo2d: PPath.setPathToRectangle method(s) are missing from versions 2 and later
Updates: Status: Accepted Owner: heue...@gmail.com Labels: Type-Defect Priority-High Effort-Medium OpSys-All Toolkit-Piccolo2D.Java Component-Core Comment #1 on issue 259 by heue...@gmail.com: PPath.setPathToRectangle method(s) are missing from versions 2 and later https://code.google.com/p/piccolo2d/issues/detail?id=259 (No comment was entered for this change.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Re: Issue 263 in piccolo2d: PPath.createPolyline method are missing from versions 2 and later
Updates: Status: Accepted Labels: Type-Defect Priority-High Effort-Medium OpSys-All Toolkit-Piccolo2D.Java Component-Core Comment #1 on issue 263 by heue...@gmail.com: PPath.createPolyline method are missing from versions 2 and later https://code.google.com/p/piccolo2d/issues/detail?id=263 (No comment was entered for this change.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Issue 264 in piccolo2d: Update maven plugin dependency versions in preparation for 3.0.1 release
Status: New Owner: New issue 264 by heue...@gmail.com: Update maven plugin dependency versions in preparation for 3.0.1 release https://code.google.com/p/piccolo2d/issues/detail?id=264 Update maven plugin dependency versions in preparation for 3.0.1 release. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Re: Issue 264 in piccolo2d: Update maven plugin dependency versions in preparation for 3.0.1 release
Updates: Status: Accepted Owner: heue...@gmail.com Labels: Type-Task Priority-High Effort-Medium OpSys-All Toolkit-Piccolo2D.Java Component-Build Comment #1 on issue 264 by heue...@gmail.com: Update maven plugin dependency versions in preparation for 3.0.1 release https://code.google.com/p/piccolo2d/issues/detail?id=264 (No comment was entered for this change.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] [piccolo2d] r1267 committed - updating maven surefire plugin dependency version to 2.18.1
Revision: 1267 Author: heuermh Date: Mon Dec 29 23:35:04 2014 UTC Log: updating maven surefire plugin dependency version to 2.18.1 https://code.google.com/p/piccolo2d/source/detail?r=1267 Modified: /piccolo2d.java/trunk/pom.xml === --- /piccolo2d.java/trunk/pom.xml Mon Sep 29 20:07:55 2014 UTC +++ /piccolo2d.java/trunk/pom.xml Mon Dec 29 23:35:04 2014 UTC @@ -12,7 +12,7 @@ and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions -2 and the following disclaimer in the documentation and/or other materials provided with the + and the following disclaimer in the documentation and/or other materials provided with the distribution. None of the name of the University of Maryland, the name of the Piccolo2D project, or the names of its @@ -277,12 +277,12 @@ maven-surefire-plugin - 2.17 + 2.18.1 org.apache.felix maven-bundle-plugin - 2.4.0 + 2.5.3 @@ -345,7 +345,7 @@ maven-surefire-report-plugin -2.17 +2.18.1 -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Re: Issue 264 in piccolo2d: Update maven plugin dependency versions in preparation for 3.0.1 release
Updates: Status: Fixed Comment #2 on issue 264 by heue...@gmail.com: Update maven plugin dependency versions in preparation for 3.0.1 release https://code.google.com/p/piccolo2d/issues/detail?id=264 Fixed in revisions r1262, r1263, and r1267. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] 5 issues changed in piccolo2d
Updates: Labels: Milestone-3.0.1 Owner: heue...@gmail.com Comment by heue...@gmail.com: (No comment was entered for this change.) Affected issues: issue 259: PPath.setPathToRectangle method(s) are missing from versions 2 and later http://code.google.com/p/piccolo2d/issues/detail?id=259 issue 260: Missplaced underlines in PStyledText http://code.google.com/p/piccolo2d/issues/detail?id=260 issue 261: PStyledText too closed for extension in derivations http://code.google.com/p/piccolo2d/issues/detail?id=261 issue 262: Provide access to getPropertyChangeListeners from PNode http://code.google.com/p/piccolo2d/issues/detail?id=262 issue 263: PPath.createPolyline method are missing from versions 2 and later http://code.google.com/p/piccolo2d/issues/detail?id=263 -- You received this message because you are listed in the owner or CC fields of these issues, or because you starred them. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] [piccolo2d] r1268 committed - Issue 263 ; adding PPath.createPolyline methods
Revision: 1268 Author: heuermh Date: Tue Dec 30 00:15:58 2014 UTC Log: Issue 263 ; adding PPath.createPolyline methods https://code.google.com/p/piccolo2d/source/detail?r=1268 Modified: /piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/nodes/PPath.java /piccolo2d.java/trunk/core/src/test/java/org/piccolo2d/nodes/AbstractPPathTest.java === --- /piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/nodes/PPath.java Tue Dec 3 22:32:41 2013 UTC +++ /piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/nodes/PPath.java Tue Dec 30 00:15:58 2014 UTC @@ -37,6 +37,7 @@ import java.awt.geom.Ellipse2D; import java.awt.geom.Line2D; import java.awt.geom.Path2D; +import java.awt.geom.Point2D; import java.awt.geom.QuadCurve2D; import java.awt.geom.Rectangle2D; import java.awt.geom.RoundRectangle2D; @@ -283,14 +284,57 @@ return new PPath.Float(new Line2D.Float(x1, y1, x2, y2)); } -/* - need setPathToPolyline +/** + * Create and return a new path node with a shape defined by the specified line segments in single + * precision floating point coordinates. + * + * @param xp array of x coordinates, must contain at least one x coordinate + * @param yp array of y coordinates, must contain at least one y coordinate + * @return a new path node with the a shape defined by the specified line segments in single + *precision floating point coordinates + */ public static final PPath createPolyline(final float[] xp, final float[] yp) { +if (xp.length < 1) { +throw new IllegalArgumentException("xp must contain at least one x coordinate"); +} +if (yp.length < 1) { +throw new IllegalArgumentException("yp must contain at least one x coordinate"); +} +if (xp.length != yp.length) { +throw new IllegalArgumentException("xp and yp must contain the same number of coordinates"); +} +Path2D.Float path = new Path2D.Float(); +path.moveTo(xp[0], yp[0]); +for (int i = 1; i < xp.length; i++) { +path.lineTo(xp[i], yp[i]); +} +path.closePath(); +return new PPath.Float(path); } +/** + * Create and return a new path node with a shape defined by the specified line segments in single + * precision floating point coordinates. + * + * @param points array of points, must not be null and must contain at least one point + * @return a new path node with the a shape defined by the specified line segments in single + *precision floating point coordinates + */ public static final PPath createPolyline(final Point2D.Float[] points) { +if (points == null) { +throw new NullPointerException("points must not be null"); +} +if (points.length < 1) { +throw new IllegalArgumentException("points must contain at least one point"); +} +Path2D.Float path = new Path2D.Float(); +path.moveTo(points[0].getX(), points[0].getY()); +for (int i = 1; i < points.length; i++) { +path.lineTo(points[i].getX(), points[i].getY()); +} +path.closePath(); +return new PPath.Float(path); } -*/ /** * Create and return a new path node with the specified quadratic curve in single === --- /piccolo2d.java/trunk/core/src/test/java/org/piccolo2d/nodes/AbstractPPathTest.java Tue Dec 3 22:32:41 2013 UTC +++ /piccolo2d.java/trunk/core/src/test/java/org/piccolo2d/nodes/AbstractPPathTest.java Tue Dec 30 00:15:58 2014 UTC @@ -155,6 +155,62 @@ public void testCreateLineDouble() { assertNotNull(PPath.createLine(0.0d, 0.0d, 50.0d, 100.0d)); } + +public void testCreatePolylineFloatArraysEmpty() { +try { +PPath.createPolyline(new float[0], new float[0]); +fail("expected IllegalArgumentException"); +} +catch (IllegalArgumentException e) { +// expected +} +} + +public void testCreatePolylineFloatArraysDifferentSizes() { +try { +PPath.createPolyline(new float[0], new float[] { 100.0f }); +fail("expected IllegalArgumentException"); +} +catch (IllegalArgumentException e) { +// expected +} +} + +public void testCreatePolylineFloatArraysDifferentSingle() { +assertNotNull(PPath.createPolyline(new float[] { 100.0f }, new float[] { 100.0f })); +} + +public void testCreatePolylineFloatArrays() { +assertNotNull(PPath.createPolyline(new float[] { 100.0f, 100.0f, 200.0f }, new float[] { 100.0f, 200.0f, 200.0f })); +} + +public void testCreatePolylinePoint2DFloatArrayNull() { +try { +PPath.createPolyline((Point2D.Float[]) null); +fail("createPolylin
[piccolo2d-dev] Re: Issue 263 in piccolo2d: PPath.createPolyline method are missing from versions 2 and later
Updates: Status: Fixed Comment #3 on issue 263 by heue...@gmail.com: PPath.createPolyline method are missing from versions 2 and later https://code.google.com/p/piccolo2d/issues/detail?id=263 Fixed by revision 1268. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] [piccolo2d] r1269 committed - Issue 263 ; final methods will break binary compability, save for 4.0
Revision: 1269 Author: heuermh Date: Tue Dec 30 02:48:02 2014 UTC Log: Issue 263 ; final methods will break binary compability, save for 4.0 https://code.google.com/p/piccolo2d/source/detail?r=1269 Modified: /piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/nodes/PPath.java === --- /piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/nodes/PPath.java Tue Dec 30 00:15:58 2014 UTC +++ /piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/nodes/PPath.java Tue Dec 30 02:48:02 2014 UTC @@ -286,14 +286,14 @@ /** * Create and return a new path node with a shape defined by the specified line segments in single - * precision floating point coordinates. + * precision floating point coordinates. Will be marked final in version 4.0. * * @param xp array of x coordinates, must contain at least one x coordinate * @param yp array of y coordinates, must contain at least one y coordinate * @return a new path node with the a shape defined by the specified line segments in single *precision floating point coordinates */ -public static final PPath createPolyline(final float[] xp, final float[] yp) { +public static PPath createPolyline(final float[] xp, final float[] yp) { if (xp.length < 1) { throw new IllegalArgumentException("xp must contain at least one x coordinate"); } @@ -314,13 +314,13 @@ /** * Create and return a new path node with a shape defined by the specified line segments in single - * precision floating point coordinates. + * precision floating point coordinates. Will be marked final in version 4.0. * * @param points array of points, must not be null and must contain at least one point * @return a new path node with the a shape defined by the specified line segments in single *precision floating point coordinates */ -public static final PPath createPolyline(final Point2D.Float[] points) { +public static PPath createPolyline(final Point2D.Float[] points) { if (points == null) { throw new NullPointerException("points must not be null"); } @@ -475,14 +475,6 @@ public static final PPath createLine(final double x1, final double y1, final double x2, final double y2) { return new PPath.Double(new Line2D.Double(x1, y1, x2, y2)); } - -/* -public static final PPath createPolyline(final double[] xp, final double[] yp) { -} - -public static final PPath createPolyline(final Point2D.Double[] points) { -} -*/ /** * Create and return a new path node with the specified quadratic curve in double -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Re: Issue 263 in piccolo2d: PPath.createPolyline method are missing from versions 2 and later
Comment #4 on issue 263 by heue...@gmail.com: PPath.createPolyline method are missing from versions 2 and later https://code.google.com/p/piccolo2d/issues/detail?id=263 Fix to retain binary compatibility in revision 1269. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Re: Issue 259 in piccolo2d: PPath.setPathToRectangle method(s) are missing from versions 2 and later
Updates: Status: WontFix Labels: -Milestone-3.0.1 Comment #3 on issue 259 by heue...@gmail.com: PPath.setPathToRectangle method(s) are missing from versions 2 and later https://code.google.com/p/piccolo2d/issues/detail?id=259 Sorry, I keep going back and forth in my head on this one. Marking as WontFix, since any setPathTo method would be equivalent to calls to reset() followed by moveTo, lineTo, etc. Adding them as instance methods to PPath might cause confusion between float and double precision arguments, and adding them as instance methods on PPath.Float and PPath.Double would mean they wouldn't be visible on the enclosing superclass. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] [piccolo2d] r1270 committed - Issue 263 ; adding @since tags
Revision: 1270 Author: heuermh Date: Tue Dec 30 03:09:21 2014 UTC Log: Issue 263 ; adding @since tags https://code.google.com/p/piccolo2d/source/detail?r=1270 Modified: /piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/nodes/PPath.java === --- /piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/nodes/PPath.java Tue Dec 30 02:48:02 2014 UTC +++ /piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/nodes/PPath.java Tue Dec 30 03:09:21 2014 UTC @@ -288,6 +288,7 @@ * Create and return a new path node with a shape defined by the specified line segments in single * precision floating point coordinates. Will be marked final in version 4.0. * + * @since 3.0.1 * @param xp array of x coordinates, must contain at least one x coordinate * @param yp array of y coordinates, must contain at least one y coordinate * @return a new path node with the a shape defined by the specified line segments in single @@ -316,6 +317,7 @@ * Create and return a new path node with a shape defined by the specified line segments in single * precision floating point coordinates. Will be marked final in version 4.0. * + * @since 3.0.1 * @param points array of points, must not be null and must contain at least one point * @return a new path node with the a shape defined by the specified line segments in single *precision floating point coordinates -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] [piccolo2d] r1271 committed - Issue 262 ; adding getPropertyChangeListeners and getPropertyChangeLis...
Revision: 1271 Author: heuermh Date: Tue Dec 30 03:27:52 2014 UTC Log: Issue 262 ; adding getPropertyChangeListeners and getPropertyChangeListeners(String) methods https://code.google.com/p/piccolo2d/source/detail?r=1271 Modified: /piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/PNode.java /piccolo2d.java/trunk/core/src/test/java/org/piccolo2d/PNodeTest.java === --- /piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/PNode.java Tue Dec 3 22:32:41 2013 UTC +++ /piccolo2d.java/trunk/core/src/main/java/org/piccolo2d/PNode.java Tue Dec 30 03:27:52 2014 UTC @@ -1198,7 +1198,7 @@ * registered for all properties. See the fields in PNode and subclasses * that start with PROPERTY_ to find out which properties exist. * - * @param listener The PropertyChangeListener to be added + * @param listener the PropertyChangeListener to be added */ public void addPropertyChangeListener(final PropertyChangeListener listener) { if (changeSupport == null) { @@ -1214,7 +1214,7 @@ * PROPERTY_ to find out which properties are supported. * * @param propertyName The name of the property to listen on. - * @param listener The PropertyChangeListener to be added + * @param listener the PropertyChangeListener to be added */ public void addPropertyChangeListener(final String propertyName, final PropertyChangeListener listener) { if (listener == null) { @@ -1230,7 +1230,7 @@ * Remove a PropertyChangeListener from the listener list. This removes a * PropertyChangeListener that was registered for all properties. * - * @param listener The PropertyChangeListener to be removed + * @param listener the PropertyChangeListener to be removed */ public void removePropertyChangeListener(final PropertyChangeListener listener) { if (changeSupport != null) { @@ -1241,8 +1241,8 @@ /** * Remove a PropertyChangeListener for a specific property. * - * @param propertyName The name of the property that was listened on. - * @param listener The PropertyChangeListener to be removed + * @param propertyName the name of the property that was listened on. + * @param listener the PropertyChangeListener to be removed */ public void removePropertyChangeListener(final String propertyName, final PropertyChangeListener listener) { if (listener == null) { @@ -1253,6 +1253,58 @@ } changeSupport.removePropertyChangeListener(propertyName, listener); } + +/** + * Return an array of all the property change listeners added to this node. + * + * If some listeners have been added with a named property, then + * the returned array will be a mixture of PropertyChangeListeners + * and PropertyChangeListenerProxys. If the calling + * method is interested in distinguishing the listeners then it must + * test each element to see if it is a PropertyChangeListenerProxy, + * perform the cast, and examine the parameter. + * + * + * PropertyChangeListener[] listeners = bean.getPropertyChangeListeners(); + * for (int i = 0; i < listeners.length; i++) { + * if (listeners[i] instanceof PropertyChangeListenerProxy) { + * PropertyChangeListenerProxy proxy = (PropertyChangeListenerProxy) listeners[i]; + * if (proxy.getPropertyName().equals("foo")) { + * // proxy is a PropertyChangeListener which was associated + * // with the property named "foo" + * } + * } + * } + * + * + * @since 3.0.1 + * @return all of the PropertyChangeListeners added or an + * empty array if no listeners have been added + */ +public PropertyChangeListener[] getPropertyChangeListeners() { +if (changeSupport == null) { +return new PropertyChangeListener[0]; +} +return changeSupport.getPropertyChangeListeners(); +} + +/** + * Return an array of all the property change listeners which have been + * associated with the named property. + * + * @since 3.0.1 + * @param propertyName the name of the property being listened to + * @return all of the PropertyChangeListeners associated with + * the named property. If no such listeners have been added, + * or if propertyName is null, an empty array is + * returned. + */ +public PropertyChangeListener[] getPropertyChangeListeners(final String propertyName) { +if (changeSupport == null) { +return new PropertyChangeListener[0]; +} +return changeSupport.getPropertyChangeListeners(propertyName); +} /** * Return the propertyChangeParentMask that determines which property change === --- /piccolo2d.java/trunk/core/src/test/java/org/piccolo2d/PNodeTest.java Tu
[piccolo2d-dev] Re: Issue 262 in piccolo2d: Provide access to getPropertyChangeListeners from PNode
Updates: Status: Fixed Comment #3 on issue 262 by heue...@gmail.com: Provide access to getPropertyChangeListeners from PNode https://code.google.com/p/piccolo2d/issues/detail?id=262 Fixed in revision 1271. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] [piccolo2d] r1272 committed - Issue 260 ; applying patch from jlessner@
Revision: 1272 Author: heuermh Date: Tue Dec 30 03:32:29 2014 UTC Log: Issue 260 ; applying patch from jlessner@ https://code.google.com/p/piccolo2d/source/detail?r=1272 Modified: /piccolo2d.java/trunk/extras/src/main/java/org/piccolo2d/extras/nodes/PStyledText.java === --- /piccolo2d.java/trunk/extras/src/main/java/org/piccolo2d/extras/nodes/PStyledText.java Tue Mar 15 22:23:53 2011 UTC +++ /piccolo2d.java/trunk/extras/src/main/java/org/piccolo2d/extras/nodes/PStyledText.java Tue Dec 30 03:32:29 2014 UTC @@ -626,7 +626,7 @@ // Draw the underline and the strikethrough after the text if (sInfo.underline != null) { -paintLine.setLine(x, y + lineInfo.maxDescent / 2, x + width, y + lineInfo.maxDescent / 2); +paintLine.setLine(curX, y + lineInfo.maxDescent / 2, x + width, y + lineInfo.maxDescent / 2); g2.draw(paintLine); } -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Re: Issue 260 in piccolo2d: Missplaced underlines in PStyledText
Updates: Status: Fixed Comment #3 on issue 260 by heue...@gmail.com: Missplaced underlines in PStyledText https://code.google.com/p/piccolo2d/issues/detail?id=260 Patch applied in revision 1272, thanks! Please review and if looks ok, mark as Status: Verified -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] Re: Issue 261 in piccolo2d: PStyledText too closed for extension in derivations
Updates: Status: Fixed Comment #3 on issue 261 by heue...@gmail.com: PStyledText too closed for extension in derivations https://code.google.com/p/piccolo2d/issues/detail?id=261 Patch applied in revision 1273, thanks! Please review and if looks ok, mark as Status: Verified -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en --- You received this message because you are subscribed to the Google Groups "Piccolo2D Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to piccolo2d-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[piccolo2d-dev] [piccolo2d] r1273 committed - Issue 261 ; applying patch from jlessner@
Revision: 1273 Author: heuermh Date: Tue Dec 30 03:46:18 2014 UTC Log: Issue 261 ; applying patch from jlessner@ https://code.google.com/p/piccolo2d/source/detail?r=1273 Modified: /piccolo2d.java/trunk/extras/src/main/java/org/piccolo2d/extras/nodes/PStyledText.java === --- /piccolo2d.java/trunk/extras/src/main/java/org/piccolo2d/extras/nodes/PStyledText.java Tue Dec 30 03:32:29 2014 UTC +++ /piccolo2d.java/trunk/extras/src/main/java/org/piccolo2d/extras/nodes/PStyledText.java Tue Dec 30 03:46:18 2014 UTC @@ -285,7 +285,7 @@ return curElement; } -private void applyFontAttribute(final RunInfo paragraphRange, final AttributedString attributedString, +protected void applyFontAttribute(final RunInfo paragraphRange, final AttributedString attributedString, final Element curElement, final Font font) { if (font != null) { attributedString.addAttribute(TextAttribute.FONT, font, Math.max(0, curElement.getStartOffset() @@ -294,7 +294,7 @@ } } -private void applyStrikeThroughAttribute(final RunInfo paragraphRange, final AttributedString attributedString, +protected void applyStrikeThroughAttribute(final RunInfo paragraphRange, final AttributedString attributedString, final Element curElement, final AttributeSet attributes) { final boolean strikethrough = StyleConstants.isStrikeThrough(attributes); if (strikethrough) { @@ -305,18 +305,18 @@ } } -private void applyUnderlineAttribute(final RunInfo paragraphRange, final AttributedString attributedString, +protected void applyUnderlineAttribute(final RunInfo paragraphRange, final AttributedString attributedString, final Element curElement, final AttributeSet attributes) { final boolean underline = StyleConstants.isUnderline(attributes); if (underline) { -attributedString.addAttribute(TextAttribute.UNDERLINE, Boolean.TRUE, Math.max(0, curElement -.getStartOffset() -- paragraphRange.startIndex), Math.min(paragraphRange.endIndex - paragraphRange.startIndex, -curElement.getEndOffset() - paragraphRange.startIndex)); +int startOffset = Math.max(0, curElement.getStartOffset() - paragraphRange.startIndex); +int endOffset = Math.min(paragraphRange.endIndex - paragraphRange.startIndex, +curElement.getEndOffset() - paragraphRange.startIndex); +attributedString.addAttribute(TextAttribute.UNDERLINE, Boolean.TRUE, startOffset, endOffset); } } -private void applyBackgroundAttribute(final StyleContext style, final RunInfo paragraphRange, +protected void applyBackgroundAttribute(final StyleContext style, final RunInfo paragraphRange, final AttributedString attributedString, final Element curElement, final AttributeSet attributes) { if (attributes.isDefined(StyleConstants.Background)) { final Color background = style.getBackground(attributes); @@ -476,12 +476,7 @@ aTextLayout = measurer.nextLayout(Float.MAX_VALUE, Math.min(lineEnd, itr.getRunLimit()), false); -final SegmentInfo sInfo = new SegmentInfo(); -sInfo.font = (Font) itr.getAttribute(TextAttribute.FONT); -sInfo.foreground = (Color) itr.getAttribute(TextAttribute.FOREGROUND); -sInfo.background = (Color) itr.getAttribute(TextAttribute.BACKGROUND); -sInfo.underline = (Boolean) itr.getAttribute(TextAttribute.UNDERLINE); -sInfo.layout = aTextLayout; +final SegmentInfo sInfo = createSegmentInfo(itr, aTextLayout); final FontMetrics metrics = StyleContext.getDefaultStyleContext().getFontMetrics( (Font) itr.getAttribute(TextAttribute.FONT)); @@ -505,6 +500,20 @@ constrainDimensionsIfNeeded(textWidth, textHeight); } +protected SegmentInfo createSegmentInfo(final AttributedCharacterIterator itr, TextLayout aTextLayout) { +final SegmentInfo sInfo = newSegmentInfo(); +sInfo.font = (Font) itr.getAttribute(TextAttribute.FONT); +sInfo.foreground = (Color) itr.getAttribute(TextAttribute.FOREGROUND); +sInfo.background = (Color) itr.getAttribute(TextAttribute.BACKGROUND); +sInfo.underline = (Boolean) itr.getAttribute(TextAttribute.UNDERLINE); +sInfo.layout = aTextLayout; +return sInfo; +} + +protected SegmentInfo newSegmentInfo() { +return new SegmentInfo(); +} + /** * @param lineInfo * @return @@ -625,10 +634,7 @@ sInfo.layout.draw(g2, curX, y); // Draw the underline and the strikethrough after the text -if (sInfo.underline != null) { -