From 41c0218bcf2cf6f26e652de9fa8eeeea2008d10b Mon Sep 17 00:00:00 2001 From: Scott Gartner Date: Mon, 26 Jan 2004 04:17:56 +0000 Subject: [PATCH] Added to MainFrame: deleteSelectedPictures(), movePicturesUp(), and movePicturesDown(). These call the coreUtil methods of the same name, but they also mark the current document as dirty. I changed the PictureInspector to use these instead of the CoreUtils directly so that we can reliably track the dirty state of the document. --- .../GalleryRemote/PictureInspector.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/com/gallery/GalleryRemote/PictureInspector.java b/com/gallery/GalleryRemote/PictureInspector.java index 0022a5d..be5da7f 100644 --- a/com/gallery/GalleryRemote/PictureInspector.java +++ b/com/gallery/GalleryRemote/PictureInspector.java @@ -40,7 +40,7 @@ /** * Bean inspector for Pictures - * + * * @author paour * @created August 16, 2002 */ @@ -247,7 +247,7 @@ private void jbInitEvents() { // Event handling /** * Menu and button handling - * + * * @param e Action event */ public void actionPerformed(ActionEvent e) { @@ -255,11 +255,17 @@ public void actionPerformed(ActionEvent e) { Log.log(Log.LEVEL_INFO, MODULE, "Command selected " + command); if (command.equals("Delete")) { - CoreUtils.deleteSelectedPictures(); + // We must call the MainFrame to delete pictures + // so that it can know that the document is now dirty. + mf.deleteSelectedPictures(); } else if (command.equals("Up")) { - CoreUtils.movePicturesUp(); + // We must call the MainFrame to move pictures + // so that it can know that the document is now dirty. + mf.movePicturesUp(); } else if (command.equals("Down")) { - CoreUtils.movePicturesDown(); + // We must call the MainFrame to move pictures + // so that it can know that the document is now dirty. + mf.movePicturesDown(); } else if (command.equals("Left")) { for (int i = 0; i < pictures.length; i++) { ((Picture) pictures[i]).rotateLeft(); @@ -335,7 +341,7 @@ public void textUpdate(DocumentEvent e) { /** * Sets the mainFrame attribute of the PictureInspector object - * + * * @param mf The new mainFrame value */ public void setMainFrame(MainFrame mf) { @@ -345,7 +351,7 @@ public void setMainFrame(MainFrame mf) { /** * Sets the picture attribute of the PictureInspector object - * + * * @param p The new picture value */ public void setPictures(Object[] pictures) {