Revision: 3535
Author: [email protected]
Date: Thu May 13 08:32:46 2010
Log: Zoom revalidation is now done in one transaction to reduce the number
of persist calls to the server. This speeds up
zooming the play pen significantly.
Also updated the beep to a nicer sound provided by Jonathan.
http://code.google.com/p/power-architect/source/detail?r=3535
Modified:
/trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPenContentPane.java
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPenContentPane.java
Fri May 7 08:33:40 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPenContentPane.java
Thu May 13 08:32:46 2010
@@ -217,9 +217,16 @@
*/
private class ZoomFixer implements PropertyChangeListener {
public void propertyChange(PropertyChangeEvent evt) {
- for (PlayPenComponent ppc : getChildren()) {
- // only table panes will need validation because they have
text
- if (!(ppc instanceof Relationship)) ppc.revalidate();
+ try {
+ begin("Revalidating all UI components.");
+ for (PlayPenComponent ppc : getChildren()) {
+ // only table panes will need validation because they
have text
+ if (!(ppc instanceof Relationship)) ppc.revalidate();
+ }
+ commit();
+ } catch (Throwable t) {
+ rollback("Failed to revalidate UI. " + t.getMessage());
+ throw new RuntimeException(t);
}
}
}