This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: BasicLookAndFeel initComponentDefaults additions


2005-12-20  Lillian Angel  <langel@redhat.com>

        *
gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java:
        Added checks for bindings in Button, CheckBox, EditorPane, 
	List, TabbedPane, ToggleButton and Tree. Fixed several 
	regressions caused by these new checks and removed TODO 
	comments for icons. There are no icons in the BasicL&F.

Index: gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java,v
retrieving revision 1.9
diff -u -r1.9 initComponentDefaults.java
--- gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java	22 Dec 2005 15:39:33 -0000	1.9
+++ gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java	22 Dec 2005 19:07:46 -0000
@@ -25,7 +25,6 @@
 import gnu.testlet.TestHarness;
 import gnu.testlet.Testlet;
 
-import java.awt.Color;
 import java.awt.Dimension;
 import java.awt.Font;
 import java.util.Arrays;
@@ -79,17 +78,29 @@
     CompoundBorderUIResource b1 = (CompoundBorderUIResource) defaults.get("Button.border");
     harness.check(b1.getInsideBorder() instanceof MarginBorder);
     harness.check(b1.getOutsideBorder() instanceof ButtonBorder);
-    harness.check(defaults.get("Button.focusInputMap") instanceof InputMapUIResource);
     harness.check(defaults.get("Button.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
     harness.check(defaults.get("Button.margin"), new InsetsUIResource(2, 14, 2, 14));
     harness.check(defaults.get("Button.textIconGap"), new Integer(4));
     harness.check(defaults.get("Button.textShiftOffset"), new Integer(0));
+    harness.check(defaults.get("Button.focusInputMap") instanceof InputMapUIResource);
+    Object b = UIManager.get("Button.focusInputMap");
+    InputMapUIResource bim = (InputMapUIResource) b;
+    KeyStroke[] kb = bim.keys();
+    harness.check(kb.length == 2);
+    harness.check(bim.get(KeyStroke.getKeyStroke("SPACE")), "pressed");
+    harness.check(bim.get(KeyStroke.getKeyStroke("released SPACE")), "released");
     
     harness.checkPoint("CheckBox");
     CompoundBorderUIResource b2 = (CompoundBorderUIResource) defaults.get("CheckBox.border");
     harness.check(b2.getInsideBorder() instanceof MarginBorder);
     harness.check(b2.getOutsideBorder() instanceof ButtonBorder);
     harness.check(defaults.get("CheckBox.focusInputMap") instanceof InputMapUIResource);
+    Object c = UIManager.get("CheckBox.focusInputMap");
+    InputMapUIResource cim = (InputMapUIResource) c;
+    KeyStroke[] kc = cim.keys();
+    harness.check(kc.length == 2);
+    harness.check(cim.get(KeyStroke.getKeyStroke("SPACE")), "pressed");
+    harness.check(cim.get(KeyStroke.getKeyStroke("released SPACE")), "released");
     harness.check(defaults.get("CheckBox.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
     harness.check(defaults.get("CheckBox.icon") instanceof Icon);
     harness.check(defaults.get("CheckBox.margin"), new InsetsUIResource(2, 2, 2, 2));
@@ -129,36 +140,76 @@
     harness.check(defaults.get("EditorPane.caretBlinkRate"), new Integer(500));
     harness.check(defaults.get("EditorPane.font"), new FontUIResource("Serif", Font.PLAIN, 12));
     harness.check(defaults.get("EditorPane.margin"), new InsetsUIResource(3, 3, 3, 3));
+    Object e = UIManager.get("EditorPane.focusInputMap");
+    InputMapUIResource eim = (InputMapUIResource) e;
+    KeyStroke[] ke = eim.keys();
+    harness.check(ke.length == 55);
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift UP")), "selection-up");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "caret-next-word");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selection-previous-word");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift KP_UP")), "selection-up");
+    harness.check(eim.get(KeyStroke.getKeyStroke("DOWN")), "caret-down");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl T")), "previous-link-action");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "caret-previous-word");
+    harness.check(eim.get(KeyStroke.getKeyStroke("CUT")), "cut-to-clipboard");
+    harness.check(eim.get(KeyStroke.getKeyStroke("END")), "caret-end-line");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift PAGE_UP")), "selection-page-up");
+    harness.check(eim.get(KeyStroke.getKeyStroke("KP_UP")), "caret-up");
+    harness.check(eim.get(KeyStroke.getKeyStroke("DELETE")), "delete-next");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl HOME")), "caret-begin");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift LEFT")), "selection-backward");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl END")), "caret-end");
+    harness.check(eim.get(KeyStroke.getKeyStroke("BACK_SPACE")), "delete-previous");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selection-next-word");
+    harness.check(eim.get(KeyStroke.getKeyStroke("LEFT")), "caret-backward");
+    harness.check(eim.get(KeyStroke.getKeyStroke("KP_LEFT")), "caret-backward");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selection-forward");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl SPACE")), "activate-link-action");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl H")), "delete-previous");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "unselect");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ENTER")), "insert-break");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift HOME")), "selection-begin-line");
+    harness.check(eim.get(KeyStroke.getKeyStroke("RIGHT")), "caret-forward");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_UP")), "selection-page-left");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift DOWN")), "selection-down");
+    harness.check(eim.get(KeyStroke.getKeyStroke("PAGE_DOWN")), "page-down");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selection-backward");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl O")), "toggle-componentOrientation");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl X")), "cut-to-clipboard");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN")), "selection-page-right");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl C")), "copy-to-clipboard");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "caret-next-word");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift END")), "selection-end-line");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "caret-previous-word");
+    harness.check(eim.get(KeyStroke.getKeyStroke("HOME")), "caret-begin-line");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl V")), "paste-from-clipboard");
+    harness.check(eim.get(KeyStroke.getKeyStroke("KP_DOWN")), "caret-down");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl A")), "select-all");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift RIGHT")), "selection-forward");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl END")), "selection-end");
+    harness.check(eim.get(KeyStroke.getKeyStroke("COPY")), "copy-to-clipboard");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selection-previous-word");
+    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl T")), "next-link-action");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift KP_DOWN")), "selection-down");
+    harness.check(eim.get(KeyStroke.getKeyStroke("TAB")), "insert-tab");
+    harness.check(eim.get(KeyStroke.getKeyStroke("UP")), "caret-up");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl HOME")), "selection-begin");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift PAGE_DOWN")), "selection-page-down");
+    harness.check(eim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "caret-forward");
+    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selection-next-word");
+    harness.check(eim.get(KeyStroke.getKeyStroke("PAGE_UP")), "page-up");
+    harness.check(eim.get(KeyStroke.getKeyStroke("PASTE")), "paste-from-clipboard");
     
     harness.checkPoint("FileChooser");
     harness.check(defaults.get("FileChooser.ancestorInputMap") instanceof InputMapUIResource);
     harness.check(defaults.get("FileChooser.cancelButtonMnemonic"), new Integer(67));
-    // FIXME: the following check is commented out - the JDK returns null because 
-    // MyBasicLookAndFeel doesn't look in the right place for the gif
-    //harness.check(defaults.get("FileChooser.detailsViewIcon"), null);
     harness.check(defaults.get("FileChooser.directoryOpenButtonMnemonic"), new Integer(79));
     harness.check(defaults.get("FileChooser.helpButtonMnemonic"), new Integer(72));
-    // FIXME: the following 3 checks are commented out - the JDK returns null because 
-    // MyBasicLookAndFeel doesn't look in the right place for the gif
-    //harness.check(defaults.get("FileChooser.detailsViewIcon"), null);
-    //harness.check(defaults.get("FileChooser.homeFolderIcon"), null);
-    //harness.check(defaults.get("FileChooser.listViewIcon"), null);
-    //harness.check(defaults.get("FileChooser.newFolderIcon"), null);
     harness.check(defaults.get("FileChooser.openButtonMnemonic"), new Integer(79));
     harness.check(defaults.get("FileChooser.saveButtonMnemonic"), new Integer(83));
     harness.check(defaults.get("FileChooser.updateButtonMnemonic"), new Integer(85));
-    // FIXME: the following check is commented out - the JDK returns null because 
-    // MyBasicLookAndFeel doesn't look in the right place for the gif
-    //harness.check(defaults.get("FileChooser.upFolderIcon"), null);
 
     harness.checkPoint("FileView");
-    // FIXME: the following 5 checks are commented out - the JDK returns null because 
-    // MyBasicLookAndFeel doesn't look in the right place for the gif
-    //harness.check(defaults.get("FileView.computerIcon"), null);
-    //harness.check(defaults.get("FileView.directoryIcon"), null);
-    //harness.check(defaults.get("FileView.fileIcon"), null);
-    //harness.check(defaults.get("FileView.floppyDriveIcon"), null);
-    //harness.check(defaults.get("FileView.hardDriveIcon"), null);
 
     harness.checkPoint("FormattedTextField");
     harness.check(defaults.get("FormattedTextField.border") instanceof BasicBorders.FieldBorder);
@@ -212,9 +263,6 @@
     harness.checkPoint("InternalFrame");
     harness.check(defaults.get("InternalFrame.border") instanceof BorderUIResource.CompoundBorderUIResource);
     harness.check(defaults.get("InternalFrame.closeIcon") instanceof Icon);
-    // FIXME: the following check is commented out - the JDK returns null because 
-    // MyBasicLookAndFeel doesn't look in the right place for the gif
-    //harness.check(defaults.get("InternalFrame.icon"), null);
     harness.check(defaults.get("InternalFrame.iconifyIcon") instanceof Icon);
     harness.check(defaults.get("InternalFrame.maximizeIcon") instanceof Icon);
     harness.check(defaults.get("InternalFrame.minimizeIcon") instanceof Icon);
@@ -229,6 +277,72 @@
     harness.check(defaults.get("List.cellRenderer") instanceof ListCellRenderer);
     harness.check(defaults.get("List.focusCellHighlightBorder") instanceof BorderUIResource.LineBorderUIResource);
     harness.check(defaults.get("List.focusInputMap") instanceof InputMapUIResource);
+    Object l = UIManager.get("List.focusInputMap");
+    InputMapUIResource lim = (InputMapUIResource) l;
+    KeyStroke[] kl = lim.keys();
+    harness.check(kl.length == 61);
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl DOWN")), "selectNextRowChangeLead");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift UP")), "selectPreviousRowExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "selectNextColumnChangeLead");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selectPreviousColumnExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift KP_UP")), "selectPreviousRowExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("DOWN")), "selectNextRow");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl UP")), "selectPreviousRowChangeLead");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "selectPreviousColumnChangeLead");
+    harness.check(lim.get(KeyStroke.getKeyStroke("CUT")), "cut");
+    harness.check(lim.get(KeyStroke.getKeyStroke("END")), "selectLastRow");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift PAGE_UP")), "scrollUpExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("KP_UP")), "selectPreviousRow");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl UP")), "selectPreviousRowExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl HOME")), "selectFirstRowChangeLead");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift LEFT")), "selectPreviousColumnExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl END")), "selectLastRowChangeLead");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl PAGE_DOWN")), "scrollDownChangeLead");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selectNextColumnExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("LEFT")), "selectPreviousColumn");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl PAGE_UP")), "scrollUpChangeLead");
+    harness.check(lim.get(KeyStroke.getKeyStroke("KP_LEFT")), "selectPreviousColumn");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selectNextColumnExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("SPACE")), "addToSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl SPACE")), "toggleAndAnchor");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift SPACE")), "extendTo");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl SPACE")), "moveSelectionTo");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl DOWN")), "selectNextRowExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "clearSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift HOME")), "selectFirstRowExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("RIGHT")), "selectNextColumn");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_UP")), "scrollUpExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift DOWN")), "selectNextRowExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("PAGE_DOWN")), "scrollDown");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl KP_UP")), "selectPreviousRowExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selectPreviousColumnExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl X")), "cut");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN")), "scrollDownExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl SLASH")), "selectAll");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl C")), "copy");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "selectNextColumnChangeLead");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift END")), "selectLastRowExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl KP_DOWN")), "selectNextRowExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "selectPreviousColumnChangeLead");
+    harness.check(lim.get(KeyStroke.getKeyStroke("HOME")), "selectFirstRow");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl V")), "paste");
+    harness.check(lim.get(KeyStroke.getKeyStroke("KP_DOWN")), "selectNextRow");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl KP_DOWN")), "selectNextRowChangeLead");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift RIGHT")), "selectNextColumnExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl A")), "selectAll");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl END")), "selectLastRowExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("COPY")), "copy");
+    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl KP_UP")), "selectPreviousRowChangeLead");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selectPreviousColumnExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift KP_DOWN")), "selectNextRowExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("UP")), "selectPreviousRow");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl HOME")), "selectFirstRowExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift PAGE_DOWN")), "scrollDownExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "selectNextColumn");
+    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selectNextColumnExtendSelection");
+    harness.check(lim.get(KeyStroke.getKeyStroke("PAGE_UP")), "scrollUp");
+    harness.check(lim.get(KeyStroke.getKeyStroke("PASTE")), "paste");
+    
     harness.check(defaults.get("List.focusInputMap.RightToLeft") instanceof InputMapUIResource);
     harness.check(defaults.get("List.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
     
@@ -270,19 +384,9 @@
     harness.check(defaults.get("OptionPane.border") instanceof BorderUIResource.EmptyBorderUIResource);
     harness.check(defaults.get("OptionPane.buttonAreaBorder") instanceof BorderUIResource.EmptyBorderUIResource);
     harness.check(defaults.get("OptionPane.buttonClickThreshhold"), new Integer(500));
-    // FIXME: the following check is commented out - the JDK returns null because 
-    // MyBasicLookAndFeel doesn't look in the right place for the gif
-    //harness.check(defaults.get("OptionPane.errorIcon"), null);
     harness.check(defaults.get("OptionPane.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
-    // FIXME: the following check is commented out - the JDK returns null because 
-    // MyBasicLookAndFeel doesn't look in the right place for the gif
-    //harness.check(defaults.get("OptionPane.informationIcon"), null);
     harness.check(defaults.get("OptionPane.messageAreaBorder") instanceof BorderUIResource.EmptyBorderUIResource);
     harness.check(defaults.get("OptionPane.minimumSize"), new DimensionUIResource(262, 90));
-    // FIXME: the following 2 checks are commented out - the JDK returns null because 
-    // MyBasicLookAndFeel doesn't look in the right place for the gif
-    //harness.check(defaults.get("OptionPane.questionIcon"), null);
-    //harness.check(defaults.get("OptionPane.warningIcon"), null);
     harness.check(defaults.get("OptionPane.windowBindings") instanceof Object[]);
 
     harness.checkPoint("Panel");
@@ -395,6 +499,8 @@
     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_UP")));
+    harness.check(keyList.contains(KeyStroke.getKeyStroke("ctrl PAGE_DOWN"))); 
     harness.check(focusInputMap.get(KeyStroke.getKeyStroke("LEFT")), "negativeUnitIncrement");
     harness.check(focusInputMap.get(KeyStroke.getKeyStroke("RIGHT")), "positiveUnitIncrement");
     harness.check(focusInputMap.get(KeyStroke.getKeyStroke("UP")), "positiveUnitIncrement");
@@ -407,6 +513,8 @@
     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_UP")), "positiveBlockIncrement");
+    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("ctrl PAGE_DOWN")), "negativeBlockIncrement");
     
     InputMap rightToLeftMap = (InputMap) defaults.get("Slider.focusInputMap.RightToLeft");
     keys = rightToLeftMap != null ? rightToLeftMap.keys() : new KeyStroke[] {};
@@ -445,6 +553,19 @@
     harness.check(defaults.get("TabbedPane.ancestorInputMap") instanceof InputMapUIResource);
     harness.check(defaults.get("TabbedPane.contentBorderInsets"), new InsetsUIResource(2, 2, 3, 3));
     harness.check(defaults.get("TabbedPane.focusInputMap") instanceof InputMapUIResource);
+    Object tab = UIManager.get("TabbedPane.focusInputMap");
+    InputMapUIResource tabim = (InputMapUIResource) tab;
+    harness.check(tabim.keys().length == 10);
+    harness.check(tabim.get(KeyStroke.getKeyStroke("ctrl DOWN")),"requestFocusForVisibleComponent");
+    harness.check(tabim.get(KeyStroke.getKeyStroke("KP_UP")),"navigateUp");
+    harness.check(tabim.get(KeyStroke.getKeyStroke("LEFT")),"navigateLeft");
+    harness.check(tabim.get(KeyStroke.getKeyStroke("ctrl KP_DOWN")),"requestFocusForVisibleComponent");
+    harness.check(tabim.get(KeyStroke.getKeyStroke("UP")),"navigateUp");
+    harness.check(tabim.get(KeyStroke.getKeyStroke("KP_DOWN")),"navigateDown");
+    harness.check(tabim.get(KeyStroke.getKeyStroke("KP_LEFT")),"navigateLeft");
+    harness.check(tabim.get(KeyStroke.getKeyStroke("RIGHT")),"navigateRight");
+    harness.check(tabim.get(KeyStroke.getKeyStroke("KP_RIGHT")),"navigateRight");
+    harness.check(tabim.get(KeyStroke.getKeyStroke("DOWN")),"navigateDown");
     harness.check(defaults.get("TabbedPane.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
     harness.check(defaults.get("TabbedPane.selectedTabPadInsets"), new InsetsUIResource(2, 2, 2, 1));
     harness.check(defaults.get("TabbedPane.tabAreaInsets"), new InsetsUIResource(3, 2, 0, 2));
@@ -645,6 +766,11 @@
     harness.checkPoint("ToggleButton");
     harness.check(defaults.get("ToggleButton.border") instanceof BorderUIResource.CompoundBorderUIResource);
     harness.check(defaults.get("ToggleButton.focusInputMap") instanceof InputMapUIResource);
+    Object to = UIManager.get("ToggleButton.focusInputMap");
+    InputMapUIResource toim = (InputMapUIResource) to;
+    harness.check(toim.keys().length == 2);
+    harness.check(toim.get(KeyStroke.getKeyStroke("SPACE")),  "pressed");
+    harness.check(toim.get(KeyStroke.getKeyStroke("released SPACE")), "released");
     harness.check(defaults.get("ToggleButton.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
     harness.check(defaults.get("ToggleButton.margin"), new InsetsUIResource(2, 14, 2, 14));
     harness.check(defaults.get("ToggleButton.textIconGap"), new Integer(4));
@@ -665,28 +791,76 @@
     harness.checkPoint("Tree");
     harness.check(defaults.get("Tree.ancestorInputMap") instanceof InputMapUIResource);
     harness.check(defaults.get("Tree.changeSelectionWithFocus"), Boolean.TRUE);
-    // FIXME: the following check is commented out - the JDK returns null because 
-    // MyBasicLookAndFeel doesn't look in the right place for the gif
-    //harness.check(defaults.get("Tree.closedIcon"), null);
     harness.check(defaults.get("Tree.drawsFocusBorderAroundIcon"), Boolean.FALSE);
     harness.check(defaults.get("Tree.editorBorder") instanceof BorderUIResource.LineBorderUIResource);
     harness.check(defaults.get("Tree.focusInputMap") instanceof InputMapUIResource);
-    harness.check(defaults.get("Tree.focusInputMap.RightToLeft") instanceof InputMapUIResource);
+    Object tr = UIManager.get("Tree.focusInputMap");
+    InputMapUIResource trim = (InputMapUIResource) tr;
+    harness.check(trim.keys().length == 56);
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl DOWN")), "selectNextChangeLead");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift UP")), "selectPreviousExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "scrollRight");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift KP_UP")), "selectPreviousExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("DOWN")), "selectNext");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl UP")), "selectPreviousChangeLead");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "scrollLeft");
+	harness.check(trim.get(KeyStroke.getKeyStroke("CUT")), "cut");
+	harness.check(trim.get(KeyStroke.getKeyStroke("END")), "selectLast");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift PAGE_UP")), "scrollUpExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("KP_UP")), "selectPrevious");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl UP")), "selectPreviousExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl HOME")), "selectFirstChangeLead");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl END")), "selectLastChangeLead");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl PAGE_DOWN")), "scrollDownChangeLead");
+	harness.check(trim.get(KeyStroke.getKeyStroke("LEFT")), "selectParent");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl PAGE_UP")), "scrollUpChangeLead");
+	harness.check(trim.get(KeyStroke.getKeyStroke("KP_LEFT")), "selectParent");
+	harness.check(trim.get(KeyStroke.getKeyStroke("SPACE")), "addToSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl SPACE")), "toggleAndAnchor");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift SPACE")), "extendTo");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl SPACE")), "moveSelectionTo");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ADD")), "expand");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "clearSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl DOWN")), "selectNextExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift HOME")), "selectFirstExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("RIGHT")), "selectChild");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_UP")), "scrollUpExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift DOWN")), "selectNextExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("PAGE_DOWN")), "scrollDownChangeSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl KP_UP")), "selectPreviousExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("SUBTRACT")), "collapse");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl X")), "cut");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN")), "scrollDownExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl SLASH")), "selectAll");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl C")), "copy");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "scrollRight");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift END")), "selectLastExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl KP_DOWN")), "selectNextExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "scrollLeft");
+	harness.check(trim.get(KeyStroke.getKeyStroke("HOME")), "selectFirst");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl V")), "paste");
+	harness.check(trim.get(KeyStroke.getKeyStroke("KP_DOWN")), "selectNext");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl A")), "selectAll");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl KP_DOWN")), "selectNextChangeLead");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl END")), "selectLastExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("COPY")), "copy");
+	harness.check(trim.get(KeyStroke.getKeyStroke("ctrl KP_UP")), "selectPreviousChangeLead");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift KP_DOWN")), "selectNextExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("UP")), "selectPrevious");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl HOME")), "selectFirstExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("shift PAGE_DOWN")), "scrollDownExtendSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "selectChild");
+	harness.check(trim.get(KeyStroke.getKeyStroke("F2")), "startEditing");
+	harness.check(trim.get(KeyStroke.getKeyStroke("PAGE_UP")), "scrollUpChangeSelection");
+	harness.check(trim.get(KeyStroke.getKeyStroke("PASTE")), "paste");    
     harness.check(defaults.get("Tree.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
     harness.check(defaults.get("Tree.hash"), new ColorUIResource(128, 128, 128));
-    // FIXME: the following check is commented out - the JDK returns null because 
-    // MyBasicLookAndFeel doesn't look in the right place for the gif
-    //harness.check(defaults.get("Tree.leafIcon"), null);
     harness.check(defaults.get("Tree.leftChildIndent"), new Integer(7));
-    // FIXME: the following check is commented out - the JDK returns null because 
-    // MyBasicLookAndFeel doesn't look in the right place for the gif
-    //harness.check(defaults.get("Tree.openIcon"), null);
     harness.check(defaults.get("Tree.rightChildIndent"), new Integer(13));
     harness.check(defaults.get("Tree.rowHeight"), new Integer(16));
     harness.check(defaults.get("Tree.scrollsOnExpand"), Boolean.TRUE);
     harness.check(defaults.get("Tree.selectionBorderColor"), new ColorUIResource(0, 0, 0));
-    harness.check(defaults.get("Tree.textForeground"), new ColorUIResource(Color.black));
-    harness.check(defaults.get("Tree.textBackground"), new ColorUIResource(new Color(192, 192,192)));
+    harness.check(defaults.get("Tree.focusInputMap.RightToLeft") instanceof InputMapUIResource);
 
     harness.checkPoint("Viewport");
     harness.check(defaults.get("Viewport.font"), new FontUIResource("Dialog", Font.PLAIN, 12));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]