Java Code Examples for javax.swing.border.TitledBorder#getTitleColor()
The following examples show how to use
javax.swing.border.TitledBorder#getTitleColor() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Test7022041.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Check behaviour of method TitledBorder.getTitleColor() */ private static void checkTitleColor() { TitledBorder titledBorder = new TitledBorder(new EmptyBorder(1, 1, 1, 1)); Color defaultColor = UIManager.getLookAndFeelDefaults().getColor("TitledBorder.titleColor"); Color titledBorderColor = titledBorder.getTitleColor(); // check default configuration if (defaultColor == null) { if (titledBorderColor == null) { return; } else { throw new RuntimeException("TitledBorder default color should be null"); } } if (!defaultColor.equals(titledBorderColor)) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } // title color is explicitly specified Color color = Color.green; titledBorder.setTitleColor(color); if (!color.equals(titledBorder.getTitleColor())) { throw new RuntimeException("TitledBorder color should be " + color.toString()); } // title color is unspecified titledBorder.setTitleColor(null); if (!defaultColor.equals(titledBorder.getTitleColor())) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } }
Example 2
Source File: Test7022041.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Check behaviour of method TitledBorder.getTitleColor() */ private static void checkTitleColor() { TitledBorder titledBorder = new TitledBorder(new EmptyBorder(1, 1, 1, 1)); Color defaultColor = UIManager.getLookAndFeelDefaults().getColor("TitledBorder.titleColor"); Color titledBorderColor = titledBorder.getTitleColor(); // check default configuration if (defaultColor == null) { if (titledBorderColor == null) { return; } else { throw new RuntimeException("TitledBorder default color should be null"); } } if (!defaultColor.equals(titledBorderColor)) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } // title color is explicitly specified Color color = Color.green; titledBorder.setTitleColor(color); if (!color.equals(titledBorder.getTitleColor())) { throw new RuntimeException("TitledBorder color should be " + color.toString()); } // title color is unspecified titledBorder.setTitleColor(null); if (!defaultColor.equals(titledBorder.getTitleColor())) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } }
Example 3
Source File: Test7022041.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Check behaviour of method TitledBorder.getTitleColor() */ private static void checkTitleColor() { TitledBorder titledBorder = new TitledBorder(new EmptyBorder(1, 1, 1, 1)); Color defaultColor = UIManager.getLookAndFeelDefaults().getColor("TitledBorder.titleColor"); Color titledBorderColor = titledBorder.getTitleColor(); // check default configuration if (defaultColor == null) { if (titledBorderColor == null) { return; } else { throw new RuntimeException("TitledBorder default color should be null"); } } if (!defaultColor.equals(titledBorderColor)) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } // title color is explicitly specified Color color = Color.green; titledBorder.setTitleColor(color); if (!color.equals(titledBorder.getTitleColor())) { throw new RuntimeException("TitledBorder color should be " + color.toString()); } // title color is unspecified titledBorder.setTitleColor(null); if (!defaultColor.equals(titledBorder.getTitleColor())) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } }
Example 4
Source File: Test7022041.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Check behaviour of method TitledBorder.getTitleColor() */ private static void checkTitleColor() { TitledBorder titledBorder = new TitledBorder(new EmptyBorder(1, 1, 1, 1)); Color defaultColor = UIManager.getLookAndFeelDefaults().getColor("TitledBorder.titleColor"); Color titledBorderColor = titledBorder.getTitleColor(); // check default configuration if (defaultColor == null) { if (titledBorderColor == null) { return; } else { throw new RuntimeException("TitledBorder default color should be null"); } } if (!defaultColor.equals(titledBorderColor)) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } // title color is explicitly specified Color color = Color.green; titledBorder.setTitleColor(color); if (!color.equals(titledBorder.getTitleColor())) { throw new RuntimeException("TitledBorder color should be " + color.toString()); } // title color is unspecified titledBorder.setTitleColor(null); if (!defaultColor.equals(titledBorder.getTitleColor())) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } }
Example 5
Source File: Test7022041.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Check behaviour of method TitledBorder.getTitleColor() */ private static void checkTitleColor() { TitledBorder titledBorder = new TitledBorder(new EmptyBorder(1, 1, 1, 1)); Color defaultColor = UIManager.getLookAndFeelDefaults().getColor("TitledBorder.titleColor"); Color titledBorderColor = titledBorder.getTitleColor(); // check default configuration if (defaultColor == null) { if (titledBorderColor == null) { return; } else { throw new RuntimeException("TitledBorder default color should be null"); } } if (!defaultColor.equals(titledBorderColor)) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } // title color is explicitly specified Color color = Color.green; titledBorder.setTitleColor(color); if (!color.equals(titledBorder.getTitleColor())) { throw new RuntimeException("TitledBorder color should be " + color.toString()); } // title color is unspecified titledBorder.setTitleColor(null); if (!defaultColor.equals(titledBorder.getTitleColor())) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } }
Example 6
Source File: Test7022041.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Check behaviour of method TitledBorder.getTitleColor() */ private static void checkTitleColor() { TitledBorder titledBorder = new TitledBorder(new EmptyBorder(1, 1, 1, 1)); Color defaultColor = UIManager.getLookAndFeelDefaults().getColor("TitledBorder.titleColor"); Color titledBorderColor = titledBorder.getTitleColor(); // check default configuration if (defaultColor == null) { if (titledBorderColor == null) { return; } else { throw new RuntimeException("TitledBorder default color should be null"); } } if (!defaultColor.equals(titledBorderColor)) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } // title color is explicitly specified Color color = Color.green; titledBorder.setTitleColor(color); if (!color.equals(titledBorder.getTitleColor())) { throw new RuntimeException("TitledBorder color should be " + color.toString()); } // title color is unspecified titledBorder.setTitleColor(null); if (!defaultColor.equals(titledBorder.getTitleColor())) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } }
Example 7
Source File: Test7022041.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Check behaviour of method TitledBorder.getTitleColor() */ private static void checkTitleColor() { TitledBorder titledBorder = new TitledBorder(new EmptyBorder(1, 1, 1, 1)); Color defaultColor = UIManager.getLookAndFeelDefaults().getColor("TitledBorder.titleColor"); Color titledBorderColor = titledBorder.getTitleColor(); // check default configuration if (defaultColor == null) { if (titledBorderColor == null) { return; } else { throw new RuntimeException("TitledBorder default color should be null"); } } if (!defaultColor.equals(titledBorderColor)) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } // title color is explicitly specified Color color = Color.green; titledBorder.setTitleColor(color); if (!color.equals(titledBorder.getTitleColor())) { throw new RuntimeException("TitledBorder color should be " + color.toString()); } // title color is unspecified titledBorder.setTitleColor(null); if (!defaultColor.equals(titledBorder.getTitleColor())) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } }
Example 8
Source File: Test7022041.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Check behaviour of method TitledBorder.getTitleColor() */ private static void checkTitleColor() { TitledBorder titledBorder = new TitledBorder(new EmptyBorder(1, 1, 1, 1)); Color defaultColor = UIManager.getLookAndFeelDefaults().getColor("TitledBorder.titleColor"); Color titledBorderColor = titledBorder.getTitleColor(); // check default configuration if (defaultColor == null) { if (titledBorderColor == null) { return; } else { throw new RuntimeException("TitledBorder default color should be null"); } } if (!defaultColor.equals(titledBorderColor)) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } // title color is explicitly specified Color color = Color.green; titledBorder.setTitleColor(color); if (!color.equals(titledBorder.getTitleColor())) { throw new RuntimeException("TitledBorder color should be " + color.toString()); } // title color is unspecified titledBorder.setTitleColor(null); if (!defaultColor.equals(titledBorder.getTitleColor())) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } }
Example 9
Source File: Test7022041.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Check behaviour of method TitledBorder.getTitleColor() */ private static void checkTitleColor() { TitledBorder titledBorder = new TitledBorder(new EmptyBorder(1, 1, 1, 1)); Color defaultColor = UIManager.getLookAndFeelDefaults().getColor("TitledBorder.titleColor"); Color titledBorderColor = titledBorder.getTitleColor(); // check default configuration if (defaultColor == null) { if (titledBorderColor == null) { return; } else { throw new RuntimeException("TitledBorder default color should be null"); } } if (!defaultColor.equals(titledBorderColor)) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } // title color is explicitly specified Color color = Color.green; titledBorder.setTitleColor(color); if (!color.equals(titledBorder.getTitleColor())) { throw new RuntimeException("TitledBorder color should be " + color.toString()); } // title color is unspecified titledBorder.setTitleColor(null); if (!defaultColor.equals(titledBorder.getTitleColor())) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } }
Example 10
Source File: Test7022041.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Check behaviour of method TitledBorder.getTitleColor() */ private static void checkTitleColor() { TitledBorder titledBorder = new TitledBorder(new EmptyBorder(1, 1, 1, 1)); Color defaultColor = UIManager.getLookAndFeelDefaults().getColor("TitledBorder.titleColor"); Color titledBorderColor = titledBorder.getTitleColor(); // check default configuration if (defaultColor == null) { if (titledBorderColor == null) { return; } else { throw new RuntimeException("TitledBorder default color should be null"); } } if (!defaultColor.equals(titledBorderColor)) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } // title color is explicitly specified Color color = Color.green; titledBorder.setTitleColor(color); if (!color.equals(titledBorder.getTitleColor())) { throw new RuntimeException("TitledBorder color should be " + color.toString()); } // title color is unspecified titledBorder.setTitleColor(null); if (!defaultColor.equals(titledBorder.getTitleColor())) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } }
Example 11
Source File: Test7022041.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Check behaviour of method TitledBorder.getTitleColor() */ private static void checkTitleColor() { TitledBorder titledBorder = new TitledBorder(new EmptyBorder(1, 1, 1, 1)); Color defaultColor = UIManager.getLookAndFeelDefaults().getColor("TitledBorder.titleColor"); Color titledBorderColor = titledBorder.getTitleColor(); // check default configuration if (defaultColor == null) { if (titledBorderColor == null) { return; } else { throw new RuntimeException("TitledBorder default color should be null"); } } if (!defaultColor.equals(titledBorderColor)) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } // title color is explicitly specified Color color = Color.green; titledBorder.setTitleColor(color); if (!color.equals(titledBorder.getTitleColor())) { throw new RuntimeException("TitledBorder color should be " + color.toString()); } // title color is unspecified titledBorder.setTitleColor(null); if (!defaultColor.equals(titledBorder.getTitleColor())) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } }
Example 12
Source File: Test7022041.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Check behaviour of method TitledBorder.getTitleColor() */ private static void checkTitleColor() { TitledBorder titledBorder = new TitledBorder(new EmptyBorder(1, 1, 1, 1)); Color defaultColor = UIManager.getLookAndFeelDefaults().getColor("TitledBorder.titleColor"); Color titledBorderColor = titledBorder.getTitleColor(); // check default configuration if (defaultColor == null) { if (titledBorderColor == null) { return; } else { throw new RuntimeException("TitledBorder default color should be null"); } } if (!defaultColor.equals(titledBorderColor)) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } // title color is explicitly specified Color color = Color.green; titledBorder.setTitleColor(color); if (!color.equals(titledBorder.getTitleColor())) { throw new RuntimeException("TitledBorder color should be " + color.toString()); } // title color is unspecified titledBorder.setTitleColor(null); if (!defaultColor.equals(titledBorder.getTitleColor())) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } }
Example 13
Source File: Test7022041.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Check behaviour of method TitledBorder.getTitleColor() */ private static void checkTitleColor() { TitledBorder titledBorder = new TitledBorder(new EmptyBorder(1, 1, 1, 1)); Color defaultColor = UIManager.getLookAndFeelDefaults().getColor("TitledBorder.titleColor"); Color titledBorderColor = titledBorder.getTitleColor(); // check default configuration if (defaultColor == null) { if (titledBorderColor == null) { return; } else { throw new RuntimeException("TitledBorder default color should be null"); } } if (!defaultColor.equals(titledBorderColor)) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } // title color is explicitly specified Color color = Color.green; titledBorder.setTitleColor(color); if (!color.equals(titledBorder.getTitleColor())) { throw new RuntimeException("TitledBorder color should be " + color.toString()); } // title color is unspecified titledBorder.setTitleColor(null); if (!defaultColor.equals(titledBorder.getTitleColor())) { throw new RuntimeException("L&F default color " + defaultColor.toString() + " differs from TitledBorder color " + titledBorderColor.toString()); } }