Revision: 3505
Author: [email protected]
Date: Thu May 6 11:44:01 2010
Log: The PPCs were changed to fire events on location and size changes so
size changes can be ignored in the persistence
layer for container pane. However, the UI systems still need to know when
the bounds change as there are numerous
places that update the UI and undo manager based on this.
http://code.google.com/p/power-architect/source/detail?r=3505
Modified:
/trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPenComponent.java
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPenComponent.java
Thu May 6 09:12:07 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPenComponent.java
Thu May 6 11:44:01 2010
@@ -372,6 +372,9 @@
int width = getWidth();
int height = getHeight();
+ Rectangle oldBounds = new Rectangle(getLocation().x,
getLocation().y,
+ getSize().width, getSize().height);
+
if (isMagicEnabled()) {
if (getPlayPen() != null) {
PlayPenComponentUI ui = getUI();
@@ -390,6 +393,8 @@
location = new Point(point.x, point.y);
firePropertyChange("location", oldLocation, point);
+ firePropertyChange("bounds", oldBounds, new
Rectangle(getLocation().x, getLocation().y,
+ getSize().width, getSize().height));
repaint();
}
@@ -412,9 +417,13 @@
@Mutator
public void setSize(Dimension size) {
+ Rectangle oldBounds = new Rectangle(getLocation().x,
getLocation().y,
+ getSize().width, getSize().height);
Dimension oldSize = this.size;
this.size = new Dimension(size);
firePropertyChange("size", oldSize, this.size);
+ firePropertyChange("bounds", oldBounds, new
Rectangle(getLocation().x, getLocation().y,
+ getSize().width, getSize().height));
}
/**