-
Bug
-
Resolution: Fixed
-
P3
-
None
-
None
-
b14
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8203572 | 11.0.1 | Prasanta Sadhukhan | P3 | Resolved | Fixed | team |
In Jemmy implementation, Minimize, Maximize and Close buttons are initializing based on index(‘bttCount’ in the implementation).
But this button order will change based on how we apply these properties to frame. If we are applying these properties while constructing the frame, then assumption of order in the jemmy is correct.
Order will be based on below API[icon button, maximize button, close button]:
protected void javax.swing.plaf.basic.BasicInternalFrameTitlePane.addSubComponents()
{
add(menuBar);
add(iconButton);
add(maxButton);
add(closeButton);
}
If we are applying theses properties using corresponding set APIs of particular property(say setClosable(), setMaximizable(), setIconifiable()), these button order will be different.
Particular handler will get executed and construction order of buttons will be based on below code peice. [close button, maximize button, icon button]
Some code piece from javax.swing.plaf.basic.BasicInternalFrameTitlePane.Handler
if ("closable" == prop) {
if (evt.getNewValue() == Boolean.TRUE) {
add(closeButton);
} else {
remove(closeButton);
}
} else if ("maximizable" == prop) {
if (evt.getNewValue() == Boolean.TRUE) {
add(maxButton);
} else {
remove(maxButton);
}
} else if ("iconable" == prop) {
if (evt.getNewValue() == Boolean.TRUE) {
add(iconButton);
} else {
remove(iconButton);
}
}
Ineffect the jemmy APIs getMinimizeButton(), getMaximizeButton(), getCloseButton() will return wrong buttons and maximize(), iconify() and close() APIs also will behave wrongly.
But this button order will change based on how we apply these properties to frame. If we are applying these properties while constructing the frame, then assumption of order in the jemmy is correct.
Order will be based on below API[icon button, maximize button, close button]:
protected void javax.swing.plaf.basic.BasicInternalFrameTitlePane.addSubComponents()
{
add(menuBar);
add(iconButton);
add(maxButton);
add(closeButton);
}
If we are applying theses properties using corresponding set APIs of particular property(say setClosable(), setMaximizable(), setIconifiable()), these button order will be different.
Particular handler will get executed and construction order of buttons will be based on below code peice. [close button, maximize button, icon button]
Some code piece from javax.swing.plaf.basic.BasicInternalFrameTitlePane.Handler
if ("closable" == prop) {
if (evt.getNewValue() == Boolean.TRUE) {
add(closeButton);
} else {
remove(closeButton);
}
} else if ("maximizable" == prop) {
if (evt.getNewValue() == Boolean.TRUE) {
add(maxButton);
} else {
remove(maxButton);
}
} else if ("iconable" == prop) {
if (evt.getNewValue() == Boolean.TRUE) {
add(iconButton);
} else {
remove(iconButton);
}
}
Ineffect the jemmy APIs getMinimizeButton(), getMaximizeButton(), getCloseButton() will return wrong buttons and maximize(), iconify() and close() APIs also will behave wrongly.
- backported by
-
JDK-8203572 Jemmy JInternalFrameOperator: Dependency with orders of Minimize, Maximize and Close buttons
-
- Resolved
-
- relates to
-
CODETOOLS-7902160 Jemmy JInternalFrameOperator: Dependency with orders of Minimize, Maximize and Close buttons
-
- Resolved
-