Skip to content
Open

Zora #86

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Undoes the last user action.
* <p>
* This action requires that the View returns a project
* specific undo action when invoking getActionMap("redo") on a View.
* specific Undo.java action when invoking getActionMap("redo") on a View.
* <p>
* This action is called when the user selects the Undo item in the Edit
* menu. The menu item is automatically created by the application.
Expand All @@ -34,7 +34,7 @@
public class UndoAction extends AbstractViewAction {

private static final long serialVersionUID = 1L;
public static final String ID = "edit.undo";
public static final String ID = "edit.Undo.java";
private ResourceBundleUtil labels = ResourceBundleUtil.getBundle("org.jhotdraw.action.Labels");
private PropertyChangeListener redoActionPropertyListener = new PropertyChangeListener() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public void set(Figure f, T value) {

/**
* Sets the attribute and returns an UndoableEditEvent which can be used
* to undo it.
* to Undo.java it.
* <p>
* Note: Unlike in previous versions of JHotDraw 7, this method does
* not call {@code f.willChange()} before setting the value, and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.jhotdraw.draw.*;

/**
* An {@code UndoableEdit} event which can undo a change of a {@link Figure}
* An {@code UndoableEdit} event which can Undo.java a change of a {@link Figure}
* attribute.
*
* @author Werner Randelshofer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.jhotdraw.util.ResourceBundleUtil;

/**
* An {@code UndoableEdit} event which can undo a change of a node in
* An {@code UndoableEdit} event which can Undo.java a change of a node in
* a {@link BezierFigure}.
*
* @version $Id: BezierNodeEdit.java -1 $
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.jhotdraw.util.*;

/**
* An {@code UndoableEdit} event which can undo a lossless transform of
* An {@code UndoableEdit} event which can Undo.java a lossless transform of
* {@link Figure}s by applying the inverse of the transform to the figures.
* <p>
* This object is useful for undoing lossless transformations, such as the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.jhotdraw.util.*;

/**
* An {@code UndoableEdit} event which can undo a lossy transform of a single
* An {@code UndoableEdit} event which can Undo.java a lossy transform of a single
* {@link Figure} by restoring the figure using its transform restore data.
* <p>
* This object is useful for undoing lossy transformations, such as the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public interface Figure extends Cloneable, Serializable {
* Transforms the shape of the Figure. Transformations using double
* precision arithmethics are inherently lossy operations. Therefore it is
* recommended to use getTransformRestoreData() restoreTransformTo() to
* provide lossless undo/redo functionality.
* provide lossless Undo.java/redo functionality.
* <p>
* This is a basic operation which does not fire events. Use the following
* code sequence, if you need event firing:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public void removeNotify(Drawing drawing) {
}
// Note: we do not set the connectors to null here, because we
// need them when we are added back to a drawing again. For example,
// when an undo is performed, after the LineConnection has been
// when an Undo.java is performed, after the LineConnection has been
// deleted.
/*
setStartConnector(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private static class ResizeHandle extends LocatorHandle {
*/
private int sx, sy;
/**
* Geometry for undo.
* Geometry for Undo.java.
*/
private Object geometry;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ protected void installListeners(JFontChooser fc) {
* Reverses configuration which was done on the specified component during
* <code>installUI</code>. This method is invoked when this
* <code>UIComponent</code> instance is being removed as the UI delegate
* for the specified component. This method should undo the
* for the specified component. This method should Undo.java the
* configuration performed in <code>installUI</code>, being careful to
* leave the <code>JComponent</code> instance in a clean state (no
* extraneous listeners, look-and-feel-specific property objects, etc.).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class DrawView extends AbstractView {

private static final long serialVersionUID = 1L;
/**
* Each DrawView uses its own undo redo manager.
* Each DrawView uses its own Undo.java redo manager.
* This allows for undoing and redoing actions per view.
*/
private UndoRedoManager undo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class NetView extends AbstractView {
private static final long serialVersionUID = 1L;
public static final String GRID_VISIBLE_PROPERTY = "gridVisible";
/**
* Each NetView uses its own undo redo manager.
* Each NetView uses its own Undo.java redo manager.
* This allows for undoing and redoing actions per view.
*/
private UndoRedoManager undo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class ODGView extends AbstractView {
public static final String GRID_VISIBLE_PROPERTY = "gridVisible";
protected JFileURIChooser exportChooser;
/**
* Each ODGView uses its own undo redo manager.
* Each ODGView uses its own Undo.java redo manager.
* This allows for undoing and redoing actions per view.
*/
private UndoRedoManager undo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class PertView extends AbstractView {
private static final long serialVersionUID = 1L;
public static final String GRID_VISIBLE_PROPERTY = "gridVisible";
/**
* Each view uses its own undo redo manager.
* Each view uses its own Undo.java redo manager.
* This allows for undoing and redoing actions per view.
*/
private UndoRedoManager undo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class SVGView extends AbstractView {
public static final String GRID_VISIBLE_PROPERTY = "gridVisible";
protected JFileURIChooser exportChooser;
/**
* Each SVGView uses its own undo redo manager.
* Each SVGView uses its own Undo.java redo manager.
* This allows for undoing and redoing actions per view.
*/
private UndoRedoManager undo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ protected JComponent createDisclosedComponent(int state) {
btn = new JButton(undoManager.getUndoAction());
btn.setUI((PaletteButtonUI) PaletteButtonUI.createUI(btn));
btn.setText(null);
labels.configureToolBarButton(btn, "edit.undo");
labels.configureToolBarButton(btn, "edit.Undo.java");
btn.putClientProperty("hideActionText", Boolean.TRUE);
gbc = new GridBagConstraints();
gbc.gridy = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public boolean getScrollableTracksViewportHeight() {
}
protected EditorPanel editorViewport;
/**
* The undo/redo manager.
* The Undo.java/redo manager.
*/
protected UndoRedoManager undoManager;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import javax.swing.undo.*;

/**
* This is basically the same like javax.swing.undo.CompoundEdit but
* This is basically the same like javax.swing.Undo.java.CompoundEdit but
* it has a slightly different behaviour:
* The compound edit ends, when it is added to itself. This way it
* can be fired two times to an UndoManager: The first time, when
Expand Down Expand Up @@ -105,7 +105,7 @@ public String getPresentationName() {
}

/**
* Returns the undo presentation name.
* Returns the Undo.java presentation name.
* If the presentation name is null, then CompoundEdit.getUndoPresentationName
* is returned.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import javax.swing.undo.UndoableEdit;

/**
* An {@code UndoableEdit} event which can undo a change of a JavaBeans property.
* An {@code UndoableEdit} event which can Undo.java a change of a JavaBeans property.
*
* @author Werner Randelshofer
* @version $Id$
Expand Down
25 changes: 13 additions & 12 deletions jhotdraw-utils/src/main/java/org/jhotdraw/undo/UndoRedoManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@
import java.awt.event.*;
import java.beans.*;
import java.util.*;
import java.util.logging.Logger;
import javax.swing.*;
import javax.swing.undo.*;
import org.jhotdraw.util.*;

/**
* Same as javax.swing.UndoManager but provides actions for undo and
* Same as javax.swing.UndoManager but provides actions for Undo.java and
* redo operations.
*
* @author Werner Randelshofer
* @version $Id$
*/
public class UndoRedoManager extends UndoManager { //javax.swing.undo.UndoManager {
public class UndoRedoManager extends UndoManager { //javax.swing.Undo.java.UndoManager {

private static final long serialVersionUID = 1L;
protected PropertyChangeSupport propertySupport = new PropertyChangeSupport(this);
Expand All @@ -38,7 +39,7 @@ public class UndoRedoManager extends UndoManager { //javax.swing.undo.UndoManage
*/
private boolean hasSignificantEdits = false;
/**
* This flag is set to true when an undo or redo
* This flag is set to true when an Undo.java or redo
* operation is in progress. The UndoRedoManager
* ignores all incoming UndoableEdit events while
* this flag is true.
Expand Down Expand Up @@ -71,7 +72,7 @@ private class UndoAction
private static final long serialVersionUID = 1L;

public UndoAction() {
labels.configureAction(this, "edit.undo");
labels.configureAction(this, "edit.Undo.java");
setEnabled(false);
}

Expand All @@ -83,7 +84,7 @@ public void actionPerformed(ActionEvent evt) {
try {
undo();
} catch (CannotUndoException e) {
System.err.println("Cannot undo: " + e);
System.err.println("Cannot Undo.java: " + e);
e.printStackTrace();
}
}
Expand Down Expand Up @@ -115,7 +116,7 @@ public void actionPerformed(ActionEvent evt) {
}
}
/**
* The undo action instance.
* The Undo.java action instance.
*/
private UndoAction undoAction;
/**
Expand All @@ -125,7 +126,7 @@ public void actionPerformed(ActionEvent evt) {

public static ResourceBundleUtil getLabels() {
if (labels == null) {
labels = ResourceBundleUtil.getBundle("org.jhotdraw.undo.Labels");
labels = ResourceBundleUtil.getBundle("org.jhotdraw.Undo.java.Labels");
}
return labels;
}
Expand All @@ -139,8 +140,8 @@ public UndoRedoManager() {
redoAction = new RedoAction();
}

public void setLocale(Locale l) {
labels = ResourceBundleUtil.getBundle("org.jhotdraw.undo.Labels", l);
public static void setLocale(Locale l) {
labels = ResourceBundleUtil.getBundle("org.jhotdraw.Undo.java.Labels", l);
}

/**
Expand Down Expand Up @@ -203,7 +204,7 @@ public boolean addEdit(UndoableEdit anEdit) {
}

/**
* Gets the undo action for use as an Undo menu item.
* Gets the Undo.java action for use as an Undo menu item.
*/
public Action getUndoAction() {
return undoAction;
Expand Down Expand Up @@ -250,7 +251,7 @@ private void updateActions() {
/**
* Undoes the last edit event.
* The UndoRedoManager ignores all incoming UndoableEdit events,
* while undo is in progress.
* while Undo.java is in progress.
*/
@Override
public void undo()
Expand Down Expand Up @@ -284,7 +285,7 @@ public void redo()
/**
* Undoes or redoes the last edit event.
* The UndoRedoManager ignores all incoming UndoableEdit events,
* while undo or redo is in progress.
* while Undo.java or redo is in progress.
*/
@Override
public void undoOrRedo()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @version $Id$
*/
/**
* Provides undo/redo support leveraging the javax.swing.undo package.
* Provides Undo.java/redo support leveraging the javax.swing.Undo.java package.
*
*/
package org.jhotdraw.undo;
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
* property name and format type between <code>"${"</code> and <code>"}"</code>.
* <p>
* For example, if there is a {@code "imagedir"} property with the value
* {@code "/org/jhotdraw/undo/images"}, then this could be used in an attribute
* {@code "/org/jhotdraw/Undo.java/images"}, then this could be used in an attribute
* like this: <code>${imagedir}/editUndo.png</code>. This is resolved at run-time
* as {@code /org/jhotdraw/undo/images/editUndo.png}.
* as {@code /org/jhotdraw/Undo.java/images/editUndo.png}.
* <p>
* Property names in placeholders can contain modifiers. Modifiers are written
* between @code "[$"} and {@code "]"}. Each modifier has a fallback chain.
Expand Down
Loading