use of javax.swing.plaf.metal.MetalLookAndFeel in project jdk8u_jdk by JetBrains.
the class Test8039750 method main.
public static void main(String[] args) {
UIDefaults table = new MetalLookAndFeel().getDefaults();
test(table.get("ToolBar.rolloverBorder"), "javax.swing.plaf.metal.MetalBorders$ButtonBorder", "javax.swing.plaf.metal.MetalBorders$RolloverMarginBorder");
test(table.get("ToolBar.nonrolloverBorder"), "javax.swing.plaf.metal.MetalBorders$ButtonBorder", "javax.swing.plaf.metal.MetalBorders$RolloverMarginBorder");
test(table.get("RootPane.frameBorder"), "javax.swing.plaf.metal.MetalBorders$FrameBorder");
test(table.get("RootPane.plainDialogBorder"), "javax.swing.plaf.metal.MetalBorders$DialogBorder");
test(table.get("RootPane.informationDialogBorder"), "javax.swing.plaf.metal.MetalBorders$DialogBorder");
test(table.get("RootPane.errorDialogBorder"), "javax.swing.plaf.metal.MetalBorders$ErrorDialogBorder");
test(table.get("RootPane.colorChooserDialogBorder"), "javax.swing.plaf.metal.MetalBorders$QuestionDialogBorder");
test(table.get("RootPane.fileChooserDialogBorder"), "javax.swing.plaf.metal.MetalBorders$QuestionDialogBorder");
test(table.get("RootPane.questionDialogBorder"), "javax.swing.plaf.metal.MetalBorders$QuestionDialogBorder");
test(table.get("RootPane.warningDialogBorder"), "javax.swing.plaf.metal.MetalBorders$WarningDialogBorder");
}
use of javax.swing.plaf.metal.MetalLookAndFeel in project jdk8u_jdk by JetBrains.
the class bug7068740 method main.
public static void main(String[] args) throws Exception {
try {
UIManager.setLookAndFeel(new MetalLookAndFeel());
setUp();
doTest();
} catch (UnsupportedLookAndFeelException e) {
e.printStackTrace();
throw new RuntimeException("Test failed");
}
}
use of javax.swing.plaf.metal.MetalLookAndFeel in project jdk8u_jdk by JetBrains.
the class MouseComboBoxTest method main.
public static void main(String[] args) throws Exception {
toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
robot = new Robot();
robot.setAutoDelay(50);
UIManager.setLookAndFeel(new MetalLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
createAndShowGUI();
}
});
toolkit.realSync();
for (int i = 0; i < items.length; i++) {
// Open popup
robot.keyPress(KeyEvent.VK_DOWN);
robot.keyRelease(KeyEvent.VK_DOWN);
toolkit.realSync();
Point point = getItemPointToClick(i);
robot.mouseMove(point.x, point.y);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
toolkit.realSync();
if (i != getSelectedIndex()) {
throw new RuntimeException("Test Failed! Incorrect value of selected index = " + getSelectedIndex() + ", expected value = " + i);
}
}
}
use of javax.swing.plaf.metal.MetalLookAndFeel in project jdk8u_jdk by JetBrains.
the class bug8048506 method main.
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new MetalLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
createAndShowGUI();
}
});
System.out.println("The test passed");
}
use of javax.swing.plaf.metal.MetalLookAndFeel in project jdk8u_jdk by JetBrains.
the class bug7170310 method main.
public static void main(String[] args) throws Exception {
try {
UIManager.setLookAndFeel(new MetalLookAndFeel());
SwingUtilities.invokeAndWait(bug7170310::createAndShowUI);
SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
toolkit.realSync();
for (int i = 0; i < TABS_NUMBER; i++) {
SwingUtilities.invokeAndWait(bug7170310::addTab);
toolkit.realSync();
}
SwingUtilities.invokeAndWait(bug7170310::check);
if (exception != null) {
System.out.println("Test failed: " + exception.getMessage());
throw exception;
} else {
System.out.printf("Test passed");
}
} finally {
frame.dispose();
}
}
Aggregations