Skip to content

Commit

Permalink
Added to MainFrame:
Browse files Browse the repository at this point in the history
  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.
  • Loading branch information
Scott Gartner committed Jan 26, 2004
1 parent 8a04b60 commit 41c0218
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions com/gallery/GalleryRemote/PictureInspector.java
Expand Up @@ -40,7 +40,7 @@

/**
* Bean inspector for Pictures
*
*
* @author paour
* @created August 16, 2002
*/
Expand Down Expand Up @@ -247,19 +247,25 @@ private void jbInitEvents() {
// Event handling
/**
* Menu and button handling
*
*
* @param e Action event
*/
public void actionPerformed(ActionEvent e) {
String command = e.getActionCommand();
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();
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 41c0218

Please sign in to comment.