[piccolo2d-dev] Issue 45 in piccolo2d: deploy maven site,
Comment #11 on issue 45 by mr0...@mro.name: deploy maven site, http://code.google.com/p/piccolo2d/issues/detail?id=45 Just added the (past) committers to parent/pom.xml in r522 - feel free to correct your timezone. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. 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 -~--~~~~--~~--~--~---
[piccolo2d-dev] [piccolo2d commit] r524 - Refactored mousePressed and mouseReleased so that code common to each is now in a helper m...
Author: allain.lalonde Date: Mon Jul 20 08:02:56 2009 New Revision: 524 Modified: piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java Log: Refactored mousePressed and mouseReleased so that code common to each is now in a helper method. Net result is a much lower cyclomatic complexity for each. Modified: piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java == --- piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java (original) +++ piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java Mon Jul 20 08:02:56 2009 @@ -424,28 +424,12 @@ sendInputEventToInputManager(e, MouseEvent.MOUSE_EXITED); } -public void mousePressed(MouseEvent e) { +public void mousePressed(MouseEvent rawEvent) { requestFocus(); boolean shouldBalanceEvent = false; -if (e.getButton() == MouseEvent.NOBUTTON) { -if ((e.getModifiers() MouseEvent.BUTTON1_MASK) == MouseEvent.BUTTON1_MASK) { -e = new MouseEvent((Component) e.getSource(), MouseEvent.MOUSE_PRESSED, e.getWhen(), e -.getModifiers(), e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger(), -MouseEvent.BUTTON1); -} -else if ((e.getModifiers() MouseEvent.BUTTON2_MASK) == MouseEvent.BUTTON2_MASK) { -e = new MouseEvent((Component) e.getSource(), MouseEvent.MOUSE_PRESSED, e.getWhen(), e -.getModifiers(), e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger(), -MouseEvent.BUTTON2); -} -else if ((e.getModifiers() MouseEvent.BUTTON3_MASK) == MouseEvent.BUTTON3_MASK) { -e = new MouseEvent((Component) e.getSource(), MouseEvent.MOUSE_PRESSED, e.getWhen(), e -.getModifiers(), e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger(), -MouseEvent.BUTTON3); -} -} +MouseEvent e = copyButtonsFromModifiers(rawEvent, MouseEvent.MOUSE_PRESSED); switch (e.getButton()) { case MouseEvent.BUTTON1: @@ -479,27 +463,11 @@ sendInputEventToInputManager(e, MouseEvent.MOUSE_PRESSED); } - -public void mouseReleased(MouseEvent e) { + +public void mouseReleased(MouseEvent rawEvent) { boolean shouldBalanceEvent = false; -if (e.getButton() == MouseEvent.NOBUTTON) { -if ((e.getModifiers() MouseEvent.BUTTON1_MASK) == MouseEvent.BUTTON1_MASK) { -e = new MouseEvent((Component) e.getSource(), MouseEvent.MOUSE_RELEASED, e.getWhen(), e -.getModifiers(), e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger(), -MouseEvent.BUTTON1); -} -else if ((e.getModifiers() MouseEvent.BUTTON2_MASK) == MouseEvent.BUTTON2_MASK) { -e = new MouseEvent((Component) e.getSource(), MouseEvent.MOUSE_RELEASED, e.getWhen(), e -.getModifiers(), e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger(), -MouseEvent.BUTTON2); -} -else if ((e.getModifiers() MouseEvent.BUTTON3_MASK) == MouseEvent.BUTTON3_MASK) { -e = new MouseEvent((Component) e.getSource(), MouseEvent.MOUSE_RELEASED, e.getWhen(), e -.getModifiers(), e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger(), -MouseEvent.BUTTON3); -} -} +MouseEvent e = copyButtonsFromModifiers(rawEvent, MouseEvent.MOUSE_RELEASED); switch (e.getButton()) { case MouseEvent.BUTTON1: @@ -533,6 +501,29 @@ sendInputEventToInputManager(e, MouseEvent.MOUSE_RELEASED); } + + private MouseEvent copyButtonsFromModifiers(final MouseEvent rawEvent, int eventType) { + if (rawEvent.getButton() != MouseEvent.NOBUTTON) { + if
[piccolo2d-dev] [piccolo2d commit] r525 - Removed some unnecessary imports from PCanvas
Author: allain.lalonde Date: Mon Jul 20 08:10:51 2009 New Revision: 525 Modified: piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java Log: Removed some unnecessary imports from PCanvas Modified: piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java == --- piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java (original) +++ piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PCanvas.java Mon Jul 20 08:10:51 2009 @@ -35,8 +35,6 @@ import java.awt.Graphics2D; import java.awt.KeyEventPostProcessor; import java.awt.event.ActionListener; -import java.awt.event.ComponentAdapter; -import java.awt.event.ComponentEvent; import java.awt.event.HierarchyEvent; import java.awt.event.HierarchyListener; import java.awt.event.InputEvent; @@ -46,8 +44,6 @@ import java.awt.event.MouseMotionListener; import java.awt.event.MouseWheelEvent; import java.awt.event.MouseWheelListener; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; import javax.swing.FocusManager; import javax.swing.JComponent; --~--~-~--~~~---~--~~ Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en -~--~~~~--~~--~--~---
[piccolo2d-dev] [piccolo2d commit] r523 - Just updated my contact info in the Maven Config File.
Author: allain.lalonde Date: Mon Jul 20 06:13:07 2009 New Revision: 523 Modified: piccolo2d.java/trunk/parent/pom.xml Log: Just updated my contact info in the Maven Config File. Modified: piccolo2d.java/trunk/parent/pom.xml == --- piccolo2d.java/trunk/parent/pom.xml (original) +++ piccolo2d.java/trunk/parent/pom.xml Mon Jul 20 06:13:07 2009 @@ -87,11 +87,13 @@ developers developer idallain.lalonde/id - nameallain.lalonde/name + nameAllain Lalonde/name roles roledeveloper/role /roles - timezone-6/timezone + emailall...@machete.ca/email + urlhttp://www.machete.ca/url + timezone-5/timezone /developer developer idbederson/id --~--~-~--~~~---~--~~ Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en -~--~~~~--~~--~--~---
[piccolo2d-dev] Re: FindBugs Plugin to Maven
allainallain.lalo...@gmail.com wrote: Any objections to me adding the FindBugs Plugin to maven build? No objections here. In larger projects of mine, the maven plugin blows up with memory problems, so you may have to tweak the default JVM and FindBugs settings a bit. michael --~--~-~--~~~---~--~~ Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en -~--~~~~--~~--~--~---
[piccolo2d-dev] Re: FindBugs Plugin to Maven
Am 20.07.2009 um 18:33 schrieb allain: Any objections to me adding the FindBugs Plugin to maven build? ähm, it's also in there yet: http://files.getdropbox.com/u/965005/piccolo2d.java/site-stage/piccolo2d-core/findbugs.html Or do you mean something different? M --~--~-~--~~~---~--~~ Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en -~--~~~~--~~--~--~---
[piccolo2d-dev] [piccolo2d commit] r527 - Adding Coverage Ignore Rules for Examples Module
Author: allain.lalonde Date: Mon Jul 20 10:22:52 2009 New Revision: 527 Modified: piccolo2d.java/trunk/parent/pom.xml Log: Adding Coverage Ignore Rules for Examples Module Modified: piccolo2d.java/trunk/parent/pom.xml == --- piccolo2d.java/trunk/parent/pom.xml (original) +++ piccolo2d.java/trunk/parent/pom.xml Mon Jul 20 10:22:52 2009 @@ -182,6 +182,17 @@ formatxml/format formathtml/format /formats + instrumentation +ignores + ignoreedu.umd.cs.piccolo.examples.*/ignore + ignoreedu.umd.cs.piccolo.examples.pswing.*/ignore + ignoreedu.umd.cs.piccolo.examples.swt.*/ignore + ignoreedu.umd.cs.piccolo.tutorial.*/ignore +/ignores +excludes + excludeedu/umd/cs/piccolo/examples/**/exclude +/excludes + /instrumentation /configuration executions execution --~--~-~--~~~---~--~~ Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en -~--~~~~--~~--~--~---
[piccolo2d-dev] Re: [piccolo2d commit] r520 - Unit tests
accidental, I was trying to figure out a way of unit testing the generated path, but failed. Forgot to change it back. 2009/7/20 Michael Heuer heue...@gmail.com On Sun, Jul 19, 2009 at 6:58 PM, codesite-nore...@google.com wrote: Author: allain.lalonde Date: Sun Jul 19 16:56:41 2009 New Revision: 520 piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PPath.java (original) +++ piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PPath.java Sun Jul 19 16:56:41 2009 @@ -102,7 +102,7 @@ private static final BasicStroke DEFAULT_STROKE = new BasicStroke(1.0f); private static final Color DEFAULT_STROKE_PAINT = Color.black; -private transient GeneralPath path; +protected transient GeneralPath path; What is the motivation for making this a protected field? michael --~--~-~--~~~---~--~~ Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en -~--~~~~--~~--~--~---
[piccolo2d-dev] [piccolo2d] r528 commited - Removing unnecessary dependency to the findbugs plugin since it was al...
Revision: 528 Author: allain.lalonde Date: Mon Jul 20 12:39:58 2009 Log: Removing unnecessary dependency to the findbugs plugin since it was already defined in the reports element. http://code.google.com/p/piccolo2d/source/detail?r=528 Modified: /piccolo2d.java/trunk/parent/pom.xml === --- /piccolo2d.java/trunk/parent/pom.xmlMon Jul 20 10:22:52 2009 +++ /piccolo2d.java/trunk/parent/pom.xmlMon Jul 20 12:39:58 2009 @@ -201,16 +201,7 @@ /goals /execution /executions - /plugin - plugin -groupIdorg.codehaus.mojo/groupId -artifactIdfindbugs-maven-plugin/artifactId -version2.0.1/version -configuration - xmlOutputtrue/xmlOutput - xmlOutputDirectorytarget/site/xmlOutputDirectory -/configuration - /plugin + /plugin /plugins /build dependencies --~--~-~--~~~---~--~~ Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en -~--~~~~--~~--~--~---
[piccolo2d-dev] Issue 103 in piccolo2d: PInputEventFilter is Overly Complex
Status: Accepted Owner: allain.lalonde Labels: Type-Enhancement Priority-High Effort-Medium OpSys-All Toolkit-Piccolo2D.Java Component-Core Milestone-2.0 Usability New issue 103 by allain.lalonde: PInputEventFilter is Overly Complex http://code.google.com/p/piccolo2d/issues/detail?id=103 PInputEventFilter has so much logic to jump through that I can't help but think that pulling out a Filter interface that returned true to acceptsEvent and allowed for developers to implement their own logic would help. For example, if I need to implement a filter that allowed for both keyboard and mouse control, but not both, I'm not even sure where to start. Maybe if I were smart enough I could hack together something involving the or, and, not masks of PInputEventFilter, but it'd be harder to debug that a simple class that implemented a tiny bit of logic when acceptsEvent gets called. Once that interface were in place you could subclass it to collect events and create a representation of the input state rather that being reactionary to individual events, it could just pass an PInputState object that could be queried for mouse states, and keyboard states. Allowing for things like holding down both left and right to mean grab. (Issue 80) Anyway, I realize that this probably breaks binary compatibility, but I think we can figure out a path in this direction. Thoughts? -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. 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 -~--~~~~--~~--~--~---
[piccolo2d-dev] [piccolo2d] r530 commited - Added back in check for modifiers applying to input events. Turns out...
Revision: 530 Author: allain.lalonde Date: Mon Jul 20 14:32:09 2009 Log: Added back in check for modifiers applying to input events. Turns out some of the examples expect this behaviour (NavigationExample being one). http://code.google.com/p/piccolo2d/source/detail?r=530 Modified: /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PInputEventFilter.java /piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/event/PInputEventFilterTest.java === --- /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PInputEventFilter.java Fri Jul 17 14:51:54 2009 +++ /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/event/PInputEventFilter.java Mon Jul 20 14:32:09 2009 @@ -104,11 +104,13 @@ if (aEvent.isHandled() !acceptsAlreadyHandledEvents) return false; -if ((modifiers andMask) != andMask || (modifiers notMask) != 0) -return false; - -if (orMask != ALL_MODIFIERS_MASK (modifiers orMask) == 0) -return false; +if (modifiers != 0) { +if ((modifiers andMask) != andMask || (modifiers notMask) != 0) +return false; + +if (orMask != ALL_MODIFIERS_MASK (modifiers orMask) == 0) +return false; +} if (aEvent.isMouseEvent() clickCount != -1 clickCount != aEvent.getClickCount()) return false; === --- /piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/event/PInputEventFilterTest.java Fri Jul 17 14:51:54 2009 +++ /piccolo2d.java/trunk/core/src/test/java/edu/umd/cs/piccolo/event/PInputEventFilterTest.java Mon Jul 20 14:32:09 2009 @@ -207,7 +207,7 @@ } private PInputEvent buildTestEvent() { -return buildTestEvent(0); +return buildTestEvent(InputEvent.BUTTON1_MASK); } private PInputEvent buildTestEvent(int modifiers) { --~--~-~--~~~---~--~~ Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en -~--~~~~--~~--~--~---
[piccolo2d-dev] Issue 24 in piccolo2d: Keyboard focus doesn't work for multiple cameras
Comment #4 on issue 24 by allain.lalonde: Keyboard focus doesn't work for multiple cameras http://code.google.com/p/piccolo2d/issues/detail?id=24 I'm not entire sure I understand this Issue. When using a regular user interface, there can only be 1 keyboard focus, why would a zoomable one be different? If my screen is showing me 2 nodes as having the keyboard focus, I should have to type something to see which is the current one. Please clarify. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. 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 -~--~~~~--~~--~--~---
[piccolo2d-dev] Issue 72 in piccolo2d: PSelectionEventHandler grip points do not scale with zoom
Comment #4 on issue 72 by allain.lalonde: PSelectionEventHandler grip points do not scale with zoom http://code.google.com/p/piccolo2d/issues/detail?id=72 I agree that the element should resize, but I think there whould be a minimum size to it. Maybe after it reaches that size making the zooming away from the node pushes the handles away from it slightly so that it doesn't overlap the selected node? Should be easy enough to implement if that's how we want it implemented. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. 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 -~--~~~~--~~--~--~---
[piccolo2d-dev] Issue 13 in piccolo2d: PSwing components cause extraneous redraws
Comment #5 on issue 13 by allain.lalonde: PSwing components cause extraneous redraws http://code.google.com/p/piccolo2d/issues/detail?id=13 Why the delay on this one? Seems like a pretty trivial change. Repaint bounds originating in the component can't be larger than the component. Makes sense. Am I missing something? -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. 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 -~--~~~~--~~--~--~---
[piccolo2d-dev] [piccolo2d] r532 commited - Fixed Issue 71; made resulting PStyledText take the camera's scale int...
Revision: 532 Author: allain.lalonde Date: Mon Jul 20 19:57:42 2009 Log: Fixed Issue 71; made resulting PStyledText take the camera's scale into account. Also, made right click call stopEditing, so that the input field was always the same size as the resulting text would be, was weird otherwise http://code.google.com/p/piccolo2d/source/detail?r=532 Modified: /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/event/PStyledTextEventHandler.java === --- /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/event/PStyledTextEventHandler.java Fri Jan 23 12:29:37 2009 +++ /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/event/PStyledTextEventHandler.java Mon Jul 20 19:57:42 2009 @@ -57,6 +57,7 @@ import edu.umd.cs.piccolo.PNode; import edu.umd.cs.piccolo.event.PBasicInputEventHandler; import edu.umd.cs.piccolo.event.PInputEvent; +import edu.umd.cs.piccolo.event.PInputEventFilter; import edu.umd.cs.piccolox.nodes.PStyledText; /** @@ -78,6 +79,9 @@ public PStyledTextEventHandler(PCanvas canvas) { super(); +PInputEventFilter filter = new PInputEventFilter(); +filter.setOrMask(InputEvent.BUTTON1_MASK | InputEvent.BUTTON3_MASK); +this.setEventFilter(filter); this.canvas = canvas; initEditor(createDefaultEditor()); } @@ -166,7 +170,11 @@ public void mousePressed(PInputEvent inputEvent) { PNode pickedNode = inputEvent.getPickedNode(); -stopEditing(); +stopEditing(inputEvent); + +if (inputEvent.getButton() != MouseEvent.BUTTON1) { +return; +} if (pickedNode instanceof PStyledText) { startEditing(inputEvent, (PStyledText) pickedNode); @@ -204,23 +212,26 @@ editedText = text; } -public void stopEditing() { -if (editedText != null) { -editedText.getDocument().removeDocumentListener(docListener); -editedText.setEditing(false); - -if (editedText.getDocument().getLength() == 0) { -editedText.removeFromParent(); -} -else { -editedText.syncWithDocument(); -} - -editor.setVisible(false); -canvas.repaint(); - -editedText = null; -} +public void stopEditing(PInputEvent event) { +if (editedText == null) { +return; +} + +editedText.getDocument().removeDocumentListener(docListener); +editedText.setEditing(false); + +if (editedText.getDocument().getLength() == 0) { +editedText.removeFromParent(); +} +else { +editedText.syncWithDocument(); +} + +editedText.setScale(1.0 / event.getCamera().getViewScale()); +editor.setVisible(false); +canvas.repaint(); + +editedText = null; } public void dispatchEventToEditor(final PInputEvent e) { --~--~-~--~~~---~--~~ Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en -~--~~~~--~~--~--~---
[piccolo2d-dev] Issue 71 in piccolo2d: PStyledTextEventHandler does not scale
Updates: Status: Fixed Comment #4 on issue 71 by allain.lalonde: PStyledTextEventHandler does not scale http://code.google.com/p/piccolo2d/issues/detail?id=71 Fixed in r532; made resulting PStyledText take the camera's scale into account. Also, made right click call stopEditing, so that the input field was always the same size as the resulting text would be, was weird otherwise -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. 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 -~--~~~~--~~--~--~---
[piccolo2d-dev] Issue 21 in piccolo2d: Cannot turn off interacting at the PRoot level
Comment #5 on issue 21 by allain.lalonde: Cannot turn off interacting at the PRoot level http://code.google.com/p/piccolo2d/issues/detail?id=21 I like this change. Seems logical to mark all cameras viewing the same root to interacting in one place. If the scene is complex, you'd have to iterate over all the PCanvases that were viewing it and mark them as interacting. This is much better. May I implement this? -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. 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 -~--~~~~--~~--~--~---
[piccolo2d-dev] Issue 99 in piccolo2d: PNode.toString refactoring
Comment #2 on issue 99 by heuermh: PNode.toString refactoring http://code.google.com/p/piccolo2d/issues/detail?id=99 My opinion would be to @deprecate all the paramString methods and remove them in the next released version. I would rather not add the new class PParamStringBuilder to core. It might fit in extras/.../piccolox/util, or we might point to external code like http://commons.apache.org/lang/api/org/apache/commons/lang/builder/ToStringBuilder.html http://commons.apache.org/lang/api/org/apache/commons/lang/builder/ReflectionToStringBuilder.html for those who wish to implement a paramString()-like toString() method in their own subclasses of PNode. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. 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 -~--~~~~--~~--~--~---
[piccolo2d-dev] Issue 99 in piccolo2d: PNode.toString refactoring
Comment #3 on issue 99 by allain.lalonde: PNode.toString refactoring http://code.google.com/p/piccolo2d/issues/detail?id=99 Sure. Of course we'd be adding an external dependency for something rather trivial. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. 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 -~--~~~~--~~--~--~---