-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
5.0
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
After the following unusual code sequence for which I have no use case, the JInternalFrame's "Restore" menu item is left enabled and non-functional.
frame.setMaximizable(false);
frame.setIconifiable(false);
frame.setIcon(true);
The BasicInternalFrameTitlePane.enableActions code does not match the BasicInternalFrameTitlePane.RestoreAction.actionPerformed code. Selecting the enabled "Restore" menu item has no effect in the user's perspective.
The fix is trivial.
Before:
protected void enableActions() {
restoreAction.setEnabled(frame.isMaximum() || frame.isIcon());
After:
protected void enableActions() {
restoreAction.setEnabled(frame.isMaximum() && frame.isMaximizable() || frame.isIcon() && frame.isIconifiable());
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
jInternalFrame.setMaximizable(false);
jInternalFrame.setIconifiable(false);
jInternalFrame.setIcon(true);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Iconified JInternalFrame's "Restore" menu item is disabled.
ACTUAL -
Iconified JInternalFrame's "Restore" menu item is enabled and non-functional.
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
After the following unusual code sequence for which I have no use case, the JInternalFrame's "Restore" menu item is left enabled and non-functional.
frame.setMaximizable(false);
frame.setIconifiable(false);
frame.setIcon(true);
The BasicInternalFrameTitlePane.enableActions code does not match the BasicInternalFrameTitlePane.RestoreAction.actionPerformed code. Selecting the enabled "Restore" menu item has no effect in the user's perspective.
The fix is trivial.
Before:
protected void enableActions() {
restoreAction.setEnabled(frame.isMaximum() || frame.isIcon());
After:
protected void enableActions() {
restoreAction.setEnabled(frame.isMaximum() && frame.isMaximizable() || frame.isIcon() && frame.isIconifiable());
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
jInternalFrame.setMaximizable(false);
jInternalFrame.setIconifiable(false);
jInternalFrame.setIcon(true);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Iconified JInternalFrame's "Restore" menu item is disabled.
ACTUAL -
Iconified JInternalFrame's "Restore" menu item is enabled and non-functional.
REPRODUCIBILITY :
This bug can be reproduced always.