1. Fix EDKT462: "Save/Save All' are still highlighted if close a msa/spd/fpd without saving

2. Fix parts of EDKT423 After modification in text editor, save and save all firsthand, they are gray

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1881 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
hche10x 2006-11-01 03:17:20 +00:00
parent a9008cdd8a
commit cc95b47b5e
5 changed files with 50 additions and 9 deletions

View File

@ -3109,6 +3109,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
}
GlobalData.openingModuleList.setModuleOpen(this.currentOpeningModuleIndex, false);
GlobalData.openingModuleList.setModuleSaved(this.currentOpeningModuleIndex, true);
this.cleanDesktopPaneModule();
this.currentOpeningModuleIndex = -1;
}
@ -3144,6 +3145,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
}
GlobalData.openingPackageList.setPackageOpen(this.currentOpeningPackageIndex, false);
GlobalData.openingPackageList.setPackageSaved(this.currentOpeningPackageIndex, true);
this.cleanDesktopPanePackage();
this.currentOpeningPackageIndex = -1;
}
@ -3179,6 +3181,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
}
GlobalData.openingPlatformList.setPlatformOpen(this.currentOpeningPlatformIndex, false);
GlobalData.openingPlatformList.setPlatformSaved(this.currentOpeningPlatformIndex, true);
this.cleanDesktopPanePlatform();
this.currentOpeningPlatformIndex = -1;
}

View File

@ -197,6 +197,7 @@ public class OpeningModuleList {
public void closeAll() {
for (int index = 0; index < this.size(); index++) {
this.setModuleOpen(index, false);
this.setModuleSaved(index, true);
}
}

View File

@ -197,6 +197,7 @@ public class OpeningPackageList {
public void closeAll() {
for (int index = 0; index < this.size(); index++) {
this.setPackageOpen(index, false);
this.setPackageSaved(index, true);
}
}

View File

@ -183,6 +183,7 @@ public class OpeningPlatformList {
public void closeAll() {
for (int index = 0; index < this.size(); index++) {
this.setPlatformOpen(index, false);
this.setPlatformSaved(index, true);
}
}

View File

@ -47,6 +47,8 @@ import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType;
import org.tianocore.frameworkwizard.common.ui.IInternalFrame;
import org.tianocore.frameworkwizard.common.ui.StarLabel;
import javax.swing.JRadioButton;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
/**
The class is used to create, update MsaHeader of MSA file
@ -55,7 +57,7 @@ import javax.swing.JRadioButton;
**/
public class MsaHeader extends IInternalFrame {
public class MsaHeader extends IInternalFrame implements DocumentListener {
///
/// Define class Serial Version UID
@ -212,7 +214,6 @@ public class MsaHeader extends IInternalFrame {
jCheckBoxIa32.setText("IA32");
jCheckBoxIa32.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
jCheckBoxIa32.addFocusListener(this);
jCheckBoxIa32.addItemListener(this);
}
return jCheckBoxIa32;
}
@ -229,7 +230,6 @@ public class MsaHeader extends IInternalFrame {
jCheckBoxX64.setText("X64");
jCheckBoxX64.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
jCheckBoxX64.addFocusListener(this);
jCheckBoxX64.addItemListener(this);
}
return jCheckBoxX64;
}
@ -246,7 +246,6 @@ public class MsaHeader extends IInternalFrame {
jCheckBoxIpf.setText("IPF");
jCheckBoxIpf.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
jCheckBoxIpf.addFocusListener(this);
jCheckBoxIpf.addItemListener(this);
}
return jCheckBoxIpf;
}
@ -263,7 +262,6 @@ public class MsaHeader extends IInternalFrame {
jCheckBoxEbc.setText("EBC");
jCheckBoxEbc.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
jCheckBoxEbc.addFocusListener(this);
jCheckBoxEbc.addItemListener(this);
}
return jCheckBoxEbc;
}
@ -280,7 +278,6 @@ public class MsaHeader extends IInternalFrame {
jCheckBoxArm.setText("ARM");
jCheckBoxArm.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
jCheckBoxArm.addFocusListener(this);
jCheckBoxArm.addItemListener(this);
}
return jCheckBoxArm;
}
@ -297,7 +294,6 @@ public class MsaHeader extends IInternalFrame {
jCheckBoxPpc.setText("PPC");
jCheckBoxPpc.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT);
jCheckBoxPpc.addFocusListener(this);
jCheckBoxPpc.addItemListener(this);
}
return jCheckBoxPpc;
}
@ -538,7 +534,6 @@ public class MsaHeader extends IInternalFrame {
jComboBoxModuleType.setBounds(new java.awt.Rectangle(valueCol, 35, valueWidth, 20));
jComboBoxModuleType.setPreferredSize(new java.awt.Dimension(valueWidth, 20));
jComboBoxModuleType.addFocusListener(this);
jComboBoxModuleType.addItemListener(this);
}
return jComboBoxModuleType;
}
@ -686,6 +681,7 @@ public class MsaHeader extends IInternalFrame {
init(msa.getMsaHeader());
init(msa.getModuleDefinitions());
init(msa.getExterns());
this.addListeners();
this.setVisible(true);
this.setViewMode(false);
@ -1544,7 +1540,6 @@ public class MsaHeader extends IInternalFrame {
jCheckBoxPcd.addFocusListener(this);
jCheckBoxPcd.addActionListener(this);
jCheckBoxPcd.setEnabled(false);
jCheckBoxPcd.addItemListener(this);
}
return jCheckBoxPcd;
}
@ -1688,5 +1683,45 @@ public class MsaHeader extends IInternalFrame {
}
this.save();
}
this.omt.setSaved(false);
}
private void addListeners() {
this.jTextFieldBaseName.getDocument().addDocumentListener(this);
this.jTextFieldGuid.getDocument().addDocumentListener(this);
this.jTextFieldAbstract.getDocument().addDocumentListener(this);
this.jTextAreaCopyright.getDocument().addDocumentListener(this);
this.jTextAreaDescription.getDocument().addDocumentListener(this);
this.jTextAreaLicense.getDocument().addDocumentListener(this);
this.jTextFieldOutputFileBasename.getDocument().addDocumentListener(this);
this.jTextFieldSpecification.getDocument().addDocumentListener(this);
this.jTextFieldURL.getDocument().addDocumentListener(this);
this.jTextFieldVersion.getDocument().addDocumentListener(this);
this.jComboBoxModuleType.addItemListener(this);
this.jCheckBoxIa32.addItemListener(this);
this.jCheckBoxX64.addItemListener(this);
this.jCheckBoxIpf.addItemListener(this);
this.jCheckBoxEbc.addItemListener(this);
this.jCheckBoxArm.addItemListener(this);
this.jCheckBoxPpc.addItemListener(this);
this.jCheckBoxPcd.addItemListener(this);
this.jCheckBoxFlashMap.addItemListener(this);
}
public void insertUpdate(DocumentEvent e) {
this.omt.setSaved(false);
}
public void removeUpdate(DocumentEvent e) {
this.omt.setSaved(false);
}
public void changedUpdate(DocumentEvent e) {
// Do nothing
}
}