// Notify changes
Iterator it = oldValues.keySet().iterator();
while (it.hasNext()) {
String n = (String) it.next();
ce.addEdit(new PropertyChangeEdit(this, n, oldValues.get(n), getPropertyValue(n)));
}
ce.end();
if (undoableEdit != null) {
undoableEdit.addEdit(ce);
}
return true;
}
if (action.startsWith(resources.getString("Font"))) {
// Save old params
CompoundEdit ce = new CompoundEdit();
HashMap oldValues = new HashMap();
oldValues.put("FONT", currentFont);
// Make changes
fontName = action.substring(resources.getString("Font").length() + 1);
updateFont();
Rectangle bounds = getBounds();
fitBounds();
// Notify changes
Iterator it = oldValues.keySet().iterator();
while (it.hasNext()) {
String n = (String) it.next();
ce.addEdit(new PropertyChangeEdit(this, n, oldValues.get(n), getPropertyValue(n)));
}
ce.end();
if (undoableEdit != null) {
undoableEdit.addEdit(ce);
}
// Repaint
bounds.add(getBounds());
notifyChange(bounds);
return true;
}
if (action.startsWith(resources.getString("Body"))) {
// Save old params
CompoundEdit ce = new CompoundEdit();
HashMap oldValues = new HashMap();
oldValues.put("FONT", currentFont);
// Make changes
fontSize = new Integer(action.substring(resources.getString("Body").length() + 1)).intValue();
updateFont();
Rectangle bounds = getBounds();
fitBounds();
// Notify changes
Iterator it = oldValues.keySet().iterator();
while (it.hasNext()) {
String n = (String) it.next();
ce.addEdit(new PropertyChangeEdit(this, n, oldValues.get(n), getPropertyValue(n)));
}
ce.end();
if (undoableEdit != null) {
undoableEdit.addEdit(ce);
}
// Repaint
bounds.add(getBounds());
notifyChange(bounds);
return true;
}
if (action.equals(resources.getString("AdjustSize"))) {
CompoundEdit ce = new CompoundEdit();
HashMap oldValues = new HashMap();
oldValues.put("WIDTH", getPropertyValue("WIDTH"));
oldValues.put("HEIGHT", getPropertyValue("HEIGHT"));
Rectangle bounds = getBounds();
fitBounds();
Iterator it = oldValues.keySet().iterator();
while (it.hasNext()) {
String n = (String) it.next();
ce.addEdit(new PropertyChangeEdit(this, n, oldValues.get(n), getPropertyValue(n)));
}
ce.end();
if (undoableEdit != null) {
undoableEdit.addEdit(ce);
}