harness.checkPoint("Slider");
harness.check(defaults.get("Slider.altTrackColor"), null);
harness.check(defaults.get("Slider.background"), new ColorUIResource(0, 0, 4));
harness.check(defaults.get("Slider.focus"), new ColorUIResource(0, 0, 12));
InputMap focusInputMap = (InputMap) defaults.get("Slider.focusInputMap");
KeyStroke[] keys = focusInputMap.keys();
// for (int i = 0; i < keys.length; i++) {
// System.out.println(keys[i] + " --> " + focusInputMap.get(keys[i]));
// }
List keyList = Arrays.asList(keys);
harness.check(keyList.contains(KeyStroke.getKeyStroke("LEFT")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("RIGHT")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("UP")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("DOWN")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("KP_LEFT")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("KP_RIGHT")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("KP_UP")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("KP_DOWN")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("HOME")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("END")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("PAGE_UP")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("PAGE_DOWN")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("ctrl PAGE_DOWN")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("ctrl PAGE_UP")));
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("LEFT")), "negativeUnitIncrement");
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("RIGHT")), "positiveUnitIncrement");
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("UP")), "positiveUnitIncrement");
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("DOWN")), "negativeUnitIncrement");
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("KP_LEFT")), "negativeUnitIncrement");
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("KP_RIGHT")), "positiveUnitIncrement");
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("KP_UP")), "positiveUnitIncrement");
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("KP_DOWN")), "negativeUnitIncrement");
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("HOME")), "minScroll");
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("END")), "maxScroll");
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("PAGE_UP")), "positiveBlockIncrement");
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("PAGE_DOWN")), "negativeBlockIncrement");
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("ctrl PAGE_DOWN")), "negativeBlockIncrement");
harness.check(focusInputMap.get(KeyStroke.getKeyStroke("ctrl PAGE_UP")), "positiveBlockIncrement");
InputMap rightToLeftMap = (InputMap) defaults.get("Slider.focusInputMap.RightToLeft");
keys = rightToLeftMap != null ? rightToLeftMap.keys() : new KeyStroke[] {};
keyList = Arrays.asList(keys);
// for (int i = 0; i < keys.length; i++) {
// System.out.println(keys[i] + " --> " + focusInputMap.get(keys[i]));
// }
harness.check(keyList.contains(KeyStroke.getKeyStroke("RIGHT")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("KP_RIGHT")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("LEFT")));
harness.check(keyList.contains(KeyStroke.getKeyStroke("KP_LEFT")));
if (rightToLeftMap == null)
{
rightToLeftMap = new InputMap(); // to prevent NullPointerException
}
harness.check(rightToLeftMap.get(KeyStroke.getKeyStroke("RIGHT")), "negativeUnitIncrement");
harness.check(rightToLeftMap.get(KeyStroke.getKeyStroke("KP_RIGHT")), "negativeUnitIncrement");
harness.check(rightToLeftMap.get(KeyStroke.getKeyStroke("LEFT")), "positiveUnitIncrement");
harness.check(rightToLeftMap.get(KeyStroke.getKeyStroke("KP_LEFT")), "positiveUnitIncrement");
harness.check(defaults.get("Slider.focusInsets"), new InsetsUIResource(0, 0, 0, 0));
harness.check(defaults.get("Slider.foreground"), new ColorUIResource(0, 0, 24));
harness.check(defaults.get("Slider.highlight"), new ColorUIResource(0, 0, 7));
harness.check(defaults.get("Slider.horizontalThumbIcon") != null);