You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by rw...@apache.org on 2012/07/28 00:42:38 UTC

svn commit: r1366562 - /pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/effects/ScaleDecorator.java

Author: rwhitcomb
Date: Fri Jul 27 22:42:37 2012
New Revision: 1366562

URL: http://svn.apache.org/viewvc?rev=1366562&view=rev
Log:
Pivot-783: ScaleDecorator doesn't repaint component when scale changes.

Added Javadoc to the ScaleDecorator class to document how to make the repaint
happen (by calling component.repaint() or removing and re-adding the decorator).

This is much easier than redoing the whole decorator infrastructure for this
one particular case.  See the discussion in JIRA.

Modified:
    pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/effects/ScaleDecorator.java

Modified: pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/effects/ScaleDecorator.java
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/effects/ScaleDecorator.java?rev=1366562&r1=1366561&r2=1366562&view=diff
==============================================================================
--- pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/effects/ScaleDecorator.java (original)
+++ pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/effects/ScaleDecorator.java Fri Jul 27 22:42:37 2012
@@ -31,6 +31,11 @@ import org.apache.pivot.wtk.VerticalAlig
 
 /**
  * Decorator that scales the painting of a component along the X and/or Y axes.
+ * <p> Generally speaking, decorators don't force a repaint of the component(s) they
+ * are attached to when their parameters are changed.  So, if this decorator is changed
+ * after being applied to a particular component (e.g., to do a dynamic resize) then
+ * either the component.repaint() method must be called or the decorator should be
+ * removed and added again to force a repaint with the new scale.
  */
 public class ScaleDecorator implements Decorator {
     private float scaleX;