[piccolo2d-dev] Issue 260 in piccolo2d: Missplaced underlines in PStyledText

2014-12-29 Thread piccolo2d

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

2014-12-29 Thread piccolo2d

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

2014-12-29 Thread piccolo2d

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

2014-12-29 Thread piccolo2d

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

2014-12-29 Thread piccolo2d

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

2014-12-29 Thread piccolo2d

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] Issue 263 in piccolo2d: PPath.createPolyline method are missing from versions 2 and later

2014-12-29 Thread piccolo2d

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 264 in piccolo2d: Update maven plugin dependency versions in preparation for 3.0.1 release

2014-12-29 Thread piccolo2d

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

2014-12-29 Thread piccolo2d

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 @@
 /plugin
 plugin
   artifactIdmaven-surefire-plugin/artifactId
-  version2.17/version
+  version2.18.1/version
 /plugin
 plugin
   groupIdorg.apache.felix/groupId
   artifactIdmaven-bundle-plugin/artifactId
-  version2.4.0/version
+  version2.5.3/version
 /plugin
   /plugins
 /pluginManagement
@@ -345,7 +345,7 @@
   /plugin
   plugin
 artifactIdmaven-surefire-report-plugin/artifactId
-version2.17/version
+version2.18.1/version
   /plugin
 /plugins
   /reporting

--
--
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

2014-12-29 Thread piccolo2d

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] [piccolo2d] r1268 committed - Issue 263 ; adding PPath.createPolyline methods

2014-12-29 Thread piccolo2d

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(createPolyline(null) expected 

[piccolo2d-dev] [piccolo2d] r1269 committed - Issue 263 ; final methods will break binary compability, save for 4.0

2014-12-29 Thread piccolo2d

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  
codefinal/code 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  
codefinal/code 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

2014-12-29 Thread piccolo2d


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

2014-12-29 Thread piccolo2d

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] r1271 committed - Issue 262 ; adding getPropertyChangeListeners and getPropertyChangeLis...

2014-12-29 Thread piccolo2d

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.

+ * p
+ * If some listeners have been added with a named property, then
+ * the returned array will be a mixture of PropertyChangeListeners
+ * and codePropertyChangeListenerProxy/codes. If the calling
+ * method is interested in distinguishing the listeners then it must
+ * test each element to see if it is a  
codePropertyChangeListenerProxy/code,

+ * perform the cast, and examine the parameter.
+ *
+ * pre
+ * PropertyChangeListener[] listeners =  
bean.getPropertyChangeListeners();

+ * for (int i = 0; i lt; 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
+ * }
+ *   }
+ * }
+ */pre
+ *
+ * @since 3.0.1
+ * @return all of the codePropertyChangeListener/codes 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 codePropertyChangeListener/codes associated  
with

+ *   the named property.  If no such listeners have been added,
+ *   or if codepropertyName/code 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-dev] Re: Issue 262 in piccolo2d: Provide access to getPropertyChangeListeners from PNode

2014-12-29 Thread piccolo2d

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.