Commit 7e6db57d authored by angermue's avatar angermue
Browse files

Saves enable status of components before postprocessing (PostprocessorPanel.setEnabled(enabled))

git-svn-id: https://www2.in.tum.de/repos/ttt/trunk@30 0463f305-d864-43cb-8a47-61cf597d4139
parent 89c1341d
......@@ -35,6 +35,7 @@ import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
......@@ -44,6 +45,8 @@ import javax.swing.JInternalFrame;
import javax.swing.JOptionPane;
import javax.swing.ProgressMonitor;
import com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable;
/**
*
* @author ziewer
......@@ -60,6 +63,9 @@ public class PostProcessorPanel extends GradientPanel {
// batch mode flag
private boolean batch = false;
//saves the enable status of some components. See setEnabled(boolean)
private HashMap<Object, Boolean> ctrlSatus = new HashMap<Object, Boolean>();
/** Creates new form PostProcessorPanel */
public PostProcessorPanel(Recording recording) throws IOException {
this(recording, false);
......@@ -980,26 +986,38 @@ public class PostProcessorPanel extends GradientPanel {
}// GEN-LAST:event_doneButtonActionPerformed
public void setEnabled(boolean enabled) {
if (enabled == false) {
//Save the enable status of components which may be disabled
ctrlSatus.put(thumbnailsCheckBox, thumbnailsCheckBox.isEnabled());
ctrlSatus.put(pdfCheckBox, pdfCheckBox.isEnabled());
ctrlSatus.put(flashCheckBox, flashCheckBox.isEnabled());
ctrlSatus.put(mp3CheckBox, mp3CheckBox.isEnabled());
ctrlSatus.put(mp4CheckBox, mp4CheckBox.isEnabled());
ctrlSatus.put(userField, userField.isEnabled());
ctrlSatus.put(serverField, serverField.isEnabled());
ctrlSatus.put(pathField, pathField.isEnabled());
ctrlSatus.put(publishButton, publishButton.isEnabled());
}
super.setEnabled(enabled);
titleField.setEnabled(enabled);
thumbnailsCheckBox.setEnabled(enabled);
thumbnailsCheckBox.setEnabled(enabled && ctrlSatus.get(thumbnailsCheckBox)); //---
htmlCheckBox.setEnabled(enabled);
pdfCheckBox.setEnabled(enabled);
pdfCheckBox.setEnabled(enabled && ctrlSatus.get(pdfCheckBox)); //---
ocrCheckBox.setEnabled(enabled);
flashCheckBox.setEnabled(enabled);
mp3CheckBox.setEnabled(enabled);
mp4CheckBox.setEnabled(enabled);
flashCheckBox.setEnabled(enabled && ctrlSatus.get(flashCheckBox)); //---
mp3CheckBox.setEnabled(enabled && ctrlSatus.get(mp3CheckBox)); //---
mp4CheckBox.setEnabled(enabled && ctrlSatus.get(mp4CheckBox)); //---
createHelpButton.setEnabled(enabled);
createButton.setEnabled(enabled);
searchFilenameField.setEnabled(enabled);
openSearchbaseFileDialogButton.setEnabled(enabled);
searchHelpButton.setEnabled(enabled);
importSearchbaseButton.setEnabled(enabled);
userField.setEnabled(enabled);
serverField.setEnabled(enabled);
pathField.setEnabled(enabled);
userField.setEnabled(enabled && ctrlSatus.get(userField)); //---
serverField.setEnabled(enabled && ctrlSatus.get(serverField)); //---
pathField.setEnabled(enabled && ctrlSatus.get(pathField)); //---
publishHelpButton.setEnabled(enabled);
publishButton.setEnabled(enabled);
publishButton.setEnabled(enabled && ctrlSatus.get(publishButton)); //---
doneButton.setEnabled(enabled);
}
......@@ -1519,3 +1537,4 @@ public class PostProcessorPanel extends GradientPanel {
private javax.swing.JLabel videoField;
// End of variables declaration//GEN-END:variables
}
// TeleTeachingTool - Presentation Recording With Automated Indexing
//
// Copyright (C) 2003-2008 Peter Ziewer - Technische Universitt Mnchen
// Copyright (C) 2003-2008 Peter Ziewer - Technische Universitt Mnchen
//
// This file is part of TeleTeachingTool.
//
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment