public static void main(String[] args) { new ButtonBorder() {{borderInsets = NEGATIVE;}}; new MenuBarBorder() {{borderInsets = NEGATIVE;}}; new MenuItemBorder() {{borderInsets = NEGATIVE;}}; new PopupMenuBorder() {{borderInsets = NEGATIVE;}}; test(create("ButtonBorder")); test(create("MenuBarBorder")); test(create("MenuItemBorder")); test(create("PopupMenuBorder")); test(create("Flush3DBorder")); test(create("InternalFrameBorder")); // NOT USED: test(create("FrameBorder")); // NOT USED: test(create("DialogBorder")); test(create("PaletteBorder")); test(create("OptionDialogBorder")); test(create("ScrollPaneBorder")); }
public void testPopupMenuBorderClass() { MetalBorders.PopupMenuBorder border = new MetalBorders.PopupMenuBorder(); assertFalse(border.isBorderOpaque()); if (isHarmony()) { assertEquals(new Insets(2, 2, 1, 1), PopupMenuBorder.borderInsets); } else { assertEquals(new Insets(3, 1, 2, 1), PopupMenuBorder.borderInsets); } assertTrue(PopupMenuBorder.borderInsets == border.getBorderInsets(newJComponent())); checkInsets(border); }