public void testMoveAction() {
// cannot test
}
public void testTitlePaneLayout() {
LayoutManager layout = pane.new TitlePaneLayout();
pane.setSize(200, 31);
final Rectangle menuBarBounds = new Rectangle(2, 7, 16, 16);
final Rectangle zeroBounds = new Rectangle();
final Rectangle closeButtonBounds = new Rectangle(182, 7, 16, 16);
final Rectangle iconButtonBounds = new Rectangle(146, 7, 16, 16);
final Rectangle maximizeButtonBounds = new Rectangle(164, 7, 16, 16);
// non-iconifiable, non-maximizable, non-closable
layout.layoutContainer(null);
assertEquals("menuBar", menuBarBounds, pane.menuBar.getBounds());
assertEquals("iconButton", zeroBounds, pane.iconButton.getBounds());
assertEquals("maximizeButton", zeroBounds, pane.maxButton.getBounds());
assertEquals("closeButton", zeroBounds, pane.closeButton.getBounds());
if (!isHarmony()) {
return;
}
// iconifiable, non-maximizable, non-closable
frame.setIconifiable(true);
layout.layoutContainer(null);
assertEquals("menuBar", menuBarBounds, pane.menuBar.getBounds());
assertEquals("iconButton", closeButtonBounds, pane.iconButton.getBounds());
assertEquals("maximizeButton", zeroBounds, pane.maxButton.getBounds());
assertEquals("closeButton", zeroBounds, pane.closeButton.getBounds());
// iconifiable, maximizable, closable
frame.setMaximizable(true);
frame.setClosable(true);
layout.layoutContainer(null);
assertEquals("menuBar", menuBarBounds, pane.menuBar.getBounds());
assertEquals("iconButton", iconButtonBounds, pane.iconButton.getBounds());
assertEquals("maximizeButton", maximizeButtonBounds, pane.maxButton.getBounds());
assertEquals("closeButton", closeButtonBounds, pane.closeButton.getBounds());
// minimumLayoutSize(), preferredLayoutSize() implementations
assertTrue("", layout.minimumLayoutSize(pane) != null);
assertTrue("", layout.preferredLayoutSize(pane) != null);
}