1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
|
/* BasicLookAndFeel.java --
Copyright (C) 2002, 2004, 2005, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.basic;
import java.awt.AWTEvent;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.SystemColor;
import java.awt.Toolkit;
import java.awt.event.AWTEventListener;
import java.awt.event.ActionEvent;
import java.awt.event.MouseEvent;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.util.Enumeration;
import java.util.ResourceBundle;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.UnsupportedAudioFileException;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ActionMap;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.KeyStroke;
import javax.swing.LookAndFeel;
import javax.swing.MenuSelectionManager;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.border.BevelBorder;
import javax.swing.border.Border;
import javax.swing.plaf.BorderUIResource;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.DimensionUIResource;
import javax.swing.plaf.FontUIResource;
import javax.swing.plaf.IconUIResource;
import javax.swing.plaf.InsetsUIResource;
/**
* A basic implementation of Swing's Look and Feel framework. This can serve
* as a base for custom look and feel implementations.
*
* @author Andrew Selkirk
*/
public abstract class BasicLookAndFeel extends LookAndFeel
implements Serializable
{
/**
* Helps closing menu popups when the user clicks outside of any menu area.
* This is implemented as an AWTEventListener that listens on the event
* queue directly, grabs all mouse events from there and finds out of they
* are targetted at a menu/submenu/menubar or not. If not,
* the MenuSelectionManager is messaged to close the currently opened menus,
* if any.
*
* @author Roman Kennke (kennke@aicas.com)
*/
private class PopupHelper implements AWTEventListener
{
/**
* Receives an event from the event queue.
*
* @param event
*/
public void eventDispatched(AWTEvent event)
{
if (event instanceof MouseEvent)
{
MouseEvent mouseEvent = (MouseEvent) event;
if (mouseEvent.getID() == MouseEvent.MOUSE_PRESSED)
mousePressed(mouseEvent);
}
}
/**
* Handles mouse pressed events from the event queue.
*
* @param ev the mouse pressed event
*/
private void mousePressed(MouseEvent ev)
{
// Autoclose all menus managed by the MenuSelectionManager.
MenuSelectionManager m = MenuSelectionManager.defaultManager();
Component target = ev.getComponent();
if (target instanceof Container)
target = ((Container) target).findComponentAt(ev.getPoint());
if (m.getSelectedPath().length > 0
&& ! m.isComponentPartOfCurrentMenu(target)
&& (((JComponent)target).getClientProperty(DONT_CANCEL_POPUP) == null
|| !((JComponent)target).getClientProperty(DONT_CANCEL_POPUP).equals(Boolean.TRUE)))
{
m.clearSelectedPath();
}
}
}
/**
* An action that can play an audio file.
*
* @author Roman Kennke (kennke@aicas.com)
*/
private class AudioAction extends AbstractAction
{
/**
* The UIDefaults key that specifies the sound.
*/
Object key;
/**
* Creates a new AudioAction.
*
* @param key the key that describes the audio action, normally a filename
* of an audio file relative to the current package
*/
AudioAction(Object key)
{
this.key = key;
}
/**
* Plays the sound represented by this action.
*
* @param event the action event that triggers this audio action
*/
public void actionPerformed(ActionEvent event)
{
// We only can handle strings for now.
if (key instanceof String)
{
String name = UIManager.getString(key);
InputStream stream = getClass().getResourceAsStream(name);
try
{
Clip clip = AudioSystem.getClip();
AudioInputStream audioStream =
AudioSystem.getAudioInputStream(stream);
clip.open(audioStream);
}
catch (LineUnavailableException ex)
{
// Nothing we can do about it.
}
catch (IOException ex)
{
// Nothing we can do about it.
}
catch (UnsupportedAudioFileException e)
{
// Nothing we can do about it.
}
}
}
}
static final long serialVersionUID = -6096995660290287879L;
/**
* This is a key for a client property that tells the PopupHelper that
* it shouldn't close popups when the mouse event target has this
* property set. This is used when the component handles popup closing
* itself.
*/
static final String DONT_CANCEL_POPUP = "noCancelPopup";
/**
* Helps closing menu popups when user clicks outside of the menu area.
*/
private transient PopupHelper popupHelper;
/**
* Maps the audio actions for this l&f.
*/
private ActionMap audioActionMap;
/**
* Creates a new instance of the Basic look and feel.
*/
public BasicLookAndFeel()
{
// Nothing to do here.
}
/**
* Creates and returns a new instance of the default resources for this look
* and feel.
*
* @return The UI defaults.
*/
public UIDefaults getDefaults()
{
// Variables
UIDefaults def = new UIDefaults();
// Initialize Class Defaults
initClassDefaults(def);
// Initialize System Colour Defaults
initSystemColorDefaults(def);
// Initialize Component Defaults
initComponentDefaults(def);
// Return UI Defaults
return def;
}
/**
* Populates the <code>defaults</code> table with mappings between class IDs
* and fully qualified class names for the UI delegates.
*
* @param defaults the defaults table (<code>null</code> not permitted).
*/
protected void initClassDefaults(UIDefaults defaults)
{
// Variables
Object[] uiDefaults;
// Initialize Class Defaults
uiDefaults = new Object[] {
"ButtonUI", "javax.swing.plaf.basic.BasicButtonUI",
"CheckBoxMenuItemUI", "javax.swing.plaf.basic.BasicCheckBoxMenuItemUI",
"CheckBoxUI", "javax.swing.plaf.basic.BasicCheckBoxUI",
"ColorChooserUI", "javax.swing.plaf.basic.BasicColorChooserUI",
"ComboBoxUI", "javax.swing.plaf.basic.BasicComboBoxUI",
"DesktopIconUI", "javax.swing.plaf.basic.BasicDesktopIconUI",
"DesktopPaneUI", "javax.swing.plaf.basic.BasicDesktopPaneUI",
"EditorPaneUI", "javax.swing.plaf.basic.BasicEditorPaneUI",
"FileChooserUI", "javax.swing.plaf.basic.BasicFileChooserUI",
"FormattedTextFieldUI", "javax.swing.plaf.basic.BasicFormattedTextFieldUI",
"InternalFrameUI", "javax.swing.plaf.basic.BasicInternalFrameUI",
"LabelUI", "javax.swing.plaf.basic.BasicLabelUI",
"ListUI", "javax.swing.plaf.basic.BasicListUI",
"MenuBarUI", "javax.swing.plaf.basic.BasicMenuBarUI",
"MenuItemUI", "javax.swing.plaf.basic.BasicMenuItemUI",
"MenuUI", "javax.swing.plaf.basic.BasicMenuUI",
"OptionPaneUI", "javax.swing.plaf.basic.BasicOptionPaneUI",
"PanelUI", "javax.swing.plaf.basic.BasicPanelUI",
"PasswordFieldUI", "javax.swing.plaf.basic.BasicPasswordFieldUI",
"PopupMenuSeparatorUI", "javax.swing.plaf.basic.BasicPopupMenuSeparatorUI",
"PopupMenuUI", "javax.swing.plaf.basic.BasicPopupMenuUI",
"ProgressBarUI", "javax.swing.plaf.basic.BasicProgressBarUI",
"RadioButtonMenuItemUI", "javax.swing.plaf.basic.BasicRadioButtonMenuItemUI",
"RadioButtonUI", "javax.swing.plaf.basic.BasicRadioButtonUI",
"RootPaneUI", "javax.swing.plaf.basic.BasicRootPaneUI",
"ScrollBarUI", "javax.swing.plaf.basic.BasicScrollBarUI",
"ScrollPaneUI", "javax.swing.plaf.basic.BasicScrollPaneUI",
"SeparatorUI", "javax.swing.plaf.basic.BasicSeparatorUI",
"SliderUI", "javax.swing.plaf.basic.BasicSliderUI",
"SplitPaneUI", "javax.swing.plaf.basic.BasicSplitPaneUI",
"SpinnerUI", "javax.swing.plaf.basic.BasicSpinnerUI",
"StandardDialogUI", "javax.swing.plaf.basic.BasicStandardDialogUI",
"TabbedPaneUI", "javax.swing.plaf.basic.BasicTabbedPaneUI",
"TableHeaderUI", "javax.swing.plaf.basic.BasicTableHeaderUI",
"TableUI", "javax.swing.plaf.basic.BasicTableUI",
"TextPaneUI", "javax.swing.plaf.basic.BasicTextPaneUI",
"TextAreaUI", "javax.swing.plaf.basic.BasicTextAreaUI",
"TextFieldUI", "javax.swing.plaf.basic.BasicTextFieldUI",
"ToggleButtonUI", "javax.swing.plaf.basic.BasicToggleButtonUI",
"ToolBarSeparatorUI", "javax.swing.plaf.basic.BasicToolBarSeparatorUI",
"ToolBarUI", "javax.swing.plaf.basic.BasicToolBarUI",
"ToolTipUI", "javax.swing.plaf.basic.BasicToolTipUI",
"TreeUI", "javax.swing.plaf.basic.BasicTreeUI",
"ViewportUI", "javax.swing.plaf.basic.BasicViewportUI"
};
// Add Class Defaults to UI Defaults table
defaults.putDefaults(uiDefaults);
}
/**
* Populates the <code>defaults</code> table with system color defaults.
*
* This sets up a couple of default values and passes them to
* {@link #loadSystemColors(UIDefaults, String[], boolean)}. If the
* look and feel is a native look and feel, these defaults may be overridden
* by the corresponding SystemColor constants.
*
* @param defaults the defaults table (<code>null</code> not permitted).
*/
protected void initSystemColorDefaults(UIDefaults defaults)
{
String[] defaultColors = new String[] {
"activeCaption", "#000080",
"activeCaptionBorder", "#C0C0C0",
"activeCaptionText", "#FFFFFF",
"control", "#C0C0C0",
"controlDkShadow", "#000000",
"controlHighlight", "#C0C0C0",
"controlLtHighlight", "#FFFFFF",
"controlShadow", "#808080",
"controlText", "#000000",
"desktop", "#005C5C",
"inactiveCaption", "#808080",
"inactiveCaptionBorder", "#C0C0C0",
"inactiveCaptionText", "#C0C0C0",
"info", "#FFFFE1",
"infoText", "#000000",
"menu", "#C0C0C0",
"menuText", "#000000",
"scrollbar", "#E0E0E0",
"text", "#C0C0C0",
"textHighlight", "#000080",
"textHighlightText", "#FFFFFF",
"textInactiveText", "#808080",
"textText", "#000000",
"window", "#FFFFFF",
"windowBorder", "#000000",
"windowText", "#000000"
};
loadSystemColors(defaults, defaultColors, isNativeLookAndFeel());
}
/**
* Populates the <code>defaults</code> table with the system colors. If
* <code>useNative</code> is <code>true</code>, the table is populated
* with the constants in {@link SystemColor}, otherwise the
* <code>systemColors</code> parameter is decoded into the defaults table.
* The system colors array is made up of pairs, where the first entry is the
* name of the system color, and the second entry is a string denoting
* an RGB color value like "#C0C0C0", which is decoded using
* {@link Color#decode(String)}.
*
* @param defaults the defaults table (<code>null</code> not permitted).
* @param systemColors defaults to use when <code>useNative</code> is
* <code>false</code>
* @param useNative when <code>true</code>, installs the values of the
* SystemColor constants, when <code>false</code>, install the values
* from <code>systemColors</code>
*/
protected void loadSystemColors(UIDefaults defaults, String[] systemColors,
boolean useNative)
{
if (useNative)
{
defaults.put("activeCaption",
new ColorUIResource(SystemColor.ACTIVE_CAPTION));
defaults.put("activeCaptionBorder",
new ColorUIResource(SystemColor.ACTIVE_CAPTION_BORDER));
defaults.put("activeCaptionText",
new ColorUIResource(SystemColor.ACTIVE_CAPTION_TEXT));
defaults.put("control",
new ColorUIResource(SystemColor.CONTROL));
defaults.put("controlDkShadow",
new ColorUIResource(SystemColor.CONTROL_DK_SHADOW));
defaults.put("controlHighlight",
new ColorUIResource(SystemColor.CONTROL_HIGHLIGHT));
defaults.put("controlLtHighlight",
new ColorUIResource(SystemColor.CONTROL_LT_HIGHLIGHT));
defaults.put("controlShadow",
new ColorUIResource(SystemColor.CONTROL_SHADOW));
defaults.put("controlText",
new ColorUIResource(SystemColor.CONTROL_TEXT));
defaults.put("desktop",
new ColorUIResource(SystemColor.DESKTOP));
defaults.put("inactiveCaption",
new ColorUIResource(SystemColor.INACTIVE_CAPTION));
defaults.put("inactiveCaptionBorder",
new ColorUIResource(SystemColor.INACTIVE_CAPTION_BORDER));
defaults.put("inactiveCaptionText",
new ColorUIResource(SystemColor.INACTIVE_CAPTION_TEXT));
defaults.put("info",
new ColorUIResource(SystemColor.INFO));
defaults.put("infoText",
new ColorUIResource(SystemColor.INFO_TEXT));
defaults.put("menu",
new ColorUIResource(SystemColor.MENU));
defaults.put("menuText",
new ColorUIResource(SystemColor.MENU_TEXT));
defaults.put("scrollbar",
new ColorUIResource(SystemColor.SCROLLBAR));
defaults.put("text",
new ColorUIResource(SystemColor.TEXT));
defaults.put("textHighlight",
new ColorUIResource(SystemColor.TEXT_HIGHLIGHT));
defaults.put("textHighlightText",
new ColorUIResource(SystemColor.TEXT_HIGHLIGHT_TEXT));
defaults.put("textInactiveText",
new ColorUIResource(SystemColor.TEXT_INACTIVE_TEXT));
defaults.put("textText",
new ColorUIResource(SystemColor.TEXT_TEXT));
defaults.put("window",
new ColorUIResource(SystemColor.WINDOW));
defaults.put("windowBorder",
new ColorUIResource(SystemColor.WINDOW_BORDER));
defaults.put("windowText",
new ColorUIResource(SystemColor.WINDOW_TEXT));
}
else
{
for (int i = 0; i < systemColors.length; i += 2)
{
Color color = Color.BLACK;
try
{
color = Color.decode(systemColors[i + 1]);
}
catch (NumberFormatException e)
{
e.printStackTrace();
}
defaults.put(systemColors[i], new ColorUIResource(color));
}
}
}
/**
* Loads the resource bundle in 'resources/basic' and adds the contained
* key/value pairs to the <code>defaults</code> table.
*
* @param defaults the UI defaults to load the resources into
*/
// FIXME: This method is not used atm and private and thus could be removed.
// However, I consider this method useful for providing localized
// descriptions and similar stuff and therefore think that we should use it
// instead and provide the resource bundles.
private void loadResourceBundle(UIDefaults defaults)
{
ResourceBundle bundle;
Enumeration e;
String key;
String value;
bundle = ResourceBundle.getBundle("resources/basic");
// Process Resources
e = bundle.getKeys();
while (e.hasMoreElements())
{
key = (String) e.nextElement();
value = bundle.getString(key);
defaults.put(key, value);
}
}
/**
* Populates the <code>defaults</code> table with UI default values for
* colors, fonts, keybindings and much more.
*
* @param defaults the defaults table (<code>null</code> not permitted).
*/
protected void initComponentDefaults(UIDefaults defaults)
{
Object[] uiDefaults;
Color highLight = new Color(249, 247, 246);
Color light = new Color(239, 235, 231);
Color shadow = new Color(139, 136, 134);
Color darkShadow = new Color(16, 16, 16);
uiDefaults = new Object[] {
"AbstractUndoableEdit.undoText", "Undo",
"AbstractUndoableEdit.redoText", "Redo",
"Button.background", new ColorUIResource(Color.LIGHT_GRAY),
"Button.border",
new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults table)
{
return BasicBorders.getButtonBorder();
}
},
"Button.darkShadow", new ColorUIResource(Color.BLACK),
"Button.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"Button.foreground", new ColorUIResource(Color.BLACK),
"Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("SPACE"), "pressed",
KeyStroke.getKeyStroke("released SPACE"), "released"
}),
"Button.highlight", new ColorUIResource(Color.WHITE),
"Button.light", new ColorUIResource(Color.LIGHT_GRAY),
"Button.margin", new InsetsUIResource(2, 14, 2, 14),
"Button.shadow", new ColorUIResource(Color.GRAY),
"Button.textIconGap", new Integer(4),
"Button.textShiftOffset", new Integer(0),
"CheckBox.background", new ColorUIResource(new Color(204, 204, 204)),
"CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null,
null),
"CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("SPACE"), "pressed",
KeyStroke.getKeyStroke("released SPACE"), "released"
}),
"CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"CheckBox.foreground", new ColorUIResource(darkShadow),
"CheckBox.icon",
new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults def)
{
return BasicIconFactory.getCheckBoxIcon();
}
},
"CheckBox.checkIcon",
new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults def)
{
return BasicIconFactory.getMenuItemCheckIcon();
}
},
"CheckBox.margin", new InsetsUIResource(2, 2, 2, 2),
"CheckBox.textIconGap", new Integer(4),
"CheckBox.textShiftOffset", new Integer(0),
"CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog",
Font.PLAIN, 12),
"CheckBoxMenuItem.acceleratorForeground",
new ColorUIResource(new Color(16, 16, 16)),
"CheckBoxMenuItem.acceleratorSelectionForeground",
new ColorUIResource(Color.white),
"CheckBoxMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(),
"CheckBoxMenuItem.background", new ColorUIResource(light),
"CheckBoxMenuItem.border", new BasicBorders.MarginBorder(),
"CheckBoxMenuItem.borderPainted", Boolean.FALSE,
"CheckBoxMenuItem.checkIcon",
new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults def)
{
return BasicIconFactory.getCheckBoxMenuItemIcon();
}
},
"CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"CheckBoxMenuItem.foreground", new ColorUIResource(darkShadow),
"CheckBoxMenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
"CheckBoxMenuItem.selectionBackground", new ColorUIResource(Color.black),
"CheckBoxMenuItem.selectionForeground", new ColorUIResource(Color.white),
"ColorChooser.background", new ColorUIResource(light),
"ColorChooser.cancelText", "Cancel",
"ColorChooser.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"ColorChooser.foreground", new ColorUIResource(darkShadow),
"ColorChooser.hsbBlueText", "B",
"ColorChooser.hsbBrightnessText", "B",
"ColorChooser.hsbGreenText", "G",
"ColorChooser.hsbHueText", "H",
"ColorChooser.hsbNameText", "HSB",
"ColorChooser.hsbRedText", "R",
"ColorChooser.hsbSaturationText", "S",
"ColorChooser.okText", "OK",
"ColorChooser.previewText", "Preview",
"ColorChooser.resetText", "Reset",
"ColorChooser.rgbBlueMnemonic", "66",
"ColorChooser.rgbBlueText", "Blue",
"ColorChooser.rgbGreenMnemonic", "78",
"ColorChooser.rgbGreenText", "Green",
"ColorChooser.rgbNameText", "RGB",
"ColorChooser.rgbRedMnemonic", "68",
"ColorChooser.rgbRedText", "Red",
"ColorChooser.sampleText", "Sample Text Sample Text",
"ColorChooser.swatchesDefaultRecentColor", new ColorUIResource(light),
"ColorChooser.swatchesNameText", "Swatches",
"ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10),
"ColorChooser.swatchesRecentText", "Recent:",
"ColorChooser.swatchesSwatchSize", new Dimension(10, 10),
"ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
"ESCAPE", "hidePopup",
"PAGE_UP", "pageUpPassThrough",
"PAGE_DOWN", "pageDownPassThrough",
"HOME", "homePassThrough",
"END", "endPassThrough"
}),
"ComboBox.background", new ColorUIResource(Color.white),
"ComboBox.buttonBackground", new ColorUIResource(light),
"ComboBox.buttonDarkShadow", new ColorUIResource(darkShadow),
"ComboBox.buttonHighlight", new ColorUIResource(highLight),
"ComboBox.buttonShadow", new ColorUIResource(shadow),
"ComboBox.disabledBackground", new ColorUIResource(light),
"ComboBox.disabledForeground", new ColorUIResource(Color.gray),
"ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
"ComboBox.foreground", new ColorUIResource(Color.black),
"ComboBox.selectionBackground", new ColorUIResource(0, 0, 128),
"ComboBox.selectionForeground", new ColorUIResource(Color.white),
"Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
"KP_LEFT", "left",
"KP_RIGHT", "right",
"ctrl F5", "restore",
"LEFT", "left",
"ctrl alt F6", "selectNextFrame",
"UP", "up",
"ctrl F6", "selectNextFrame",
"RIGHT", "right",
"DOWN", "down",
"ctrl F7", "move",
"ctrl F8", "resize",
"ESCAPE", "escape",
"ctrl TAB", "selectNextFrame",
"ctrl F9", "minimize",
"KP_UP", "up",
"ctrl F4", "close",
"KP_DOWN", "down",
"ctrl F10", "maximize",
"ctrl alt shift F6", "selectPreviousFrame"
}),
"DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null,
null),
"EditorPane.background", new ColorUIResource(Color.white),
"EditorPane.border", BasicBorders.getMarginBorder(),
"EditorPane.caretBlinkRate", new Integer(500),
"EditorPane.caretForeground", new ColorUIResource(Color.black),
"EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12),
"EditorPane.foreground", new ColorUIResource(Color.black),
"EditorPane.inactiveForeground", new ColorUIResource(Color.gray),
"EditorPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("shift UP"), "selection-up",
KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
KeyStroke.getKeyStroke("shift KP_UP"), "selection-up",
KeyStroke.getKeyStroke("DOWN"), "caret-down",
KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action",
KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
KeyStroke.getKeyStroke("END"), "caret-end-line",
KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up",
KeyStroke.getKeyStroke("KP_UP"), "caret-up",
KeyStroke.getKeyStroke("DELETE"), "delete-next",
KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin",
KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
KeyStroke.getKeyStroke("ctrl END"), "caret-end",
KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
KeyStroke.getKeyStroke("LEFT"), "caret-backward",
KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action",
KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
KeyStroke.getKeyStroke("ENTER"), "insert-break",
KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left",
KeyStroke.getKeyStroke("shift DOWN"), "selection-down",
KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down",
KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right",
KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
KeyStroke.getKeyStroke("shift END"), "selection-end-line",
KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
KeyStroke.getKeyStroke("KP_DOWN"), "caret-down",
KeyStroke.getKeyStroke("ctrl A"), "select-all",
KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
KeyStroke.getKeyStroke("shift ctrl END"), "selection-end",
KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
KeyStroke.getKeyStroke("ctrl T"), "next-link-action",
KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down",
KeyStroke.getKeyStroke("TAB"), "insert-tab",
KeyStroke.getKeyStroke("UP"), "caret-up",
KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin",
KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down",
KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
KeyStroke.getKeyStroke("PAGE_UP"), "page-up",
KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard"
}),
"EditorPane.margin", new InsetsUIResource(3, 3, 3, 3),
"EditorPane.selectionBackground", new ColorUIResource(Color.black),
"EditorPane.selectionForeground", new ColorUIResource(Color.white),
"FileChooser.acceptAllFileFilterText", "All Files (*.*)",
"FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
"ESCAPE", "cancelSelection"
}),
"FileChooser.cancelButtonMnemonic", "67",
"FileChooser.cancelButtonText", "Cancel",
"FileChooser.cancelButtonToolTipText", "Abort file chooser dialog",
"FileChooser.directoryDescriptionText", "Directory",
"FileChooser.fileDescriptionText", "Generic File",
"FileChooser.directoryOpenButtonMnemonic", "79",
"FileChooser.helpButtonMnemonic", "72",
"FileChooser.helpButtonText", "Help",
"FileChooser.helpButtonToolTipText", "FileChooser help",
"FileChooser.newFolderErrorSeparator", ":",
"FileChooser.newFolderErrorText", "Error creating new folder",
"FileChooser.openButtonMnemonic", "79",
"FileChooser.openButtonText", "Open",
"FileChooser.openButtonToolTipText", "Open selected file",
"FileChooser.saveButtonMnemonic", "83",
"FileChooser.saveButtonText", "Save",
"FileChooser.saveButtonToolTipText", "Save selected file",
"FileChooser.updateButtonMnemonic", "85",
"FileChooser.updateButtonText", "Update",
"FileChooser.updateButtonToolTipText", "Update directory listing",
"FocusManagerClassName", "TODO",
"FormattedTextField.background", new ColorUIResource(light),
"FormattedTextField.caretForeground", new ColorUIResource(Color.black),
"FormattedTextField.margin", new InsetsUIResource(0, 0, 0, 0),
"FormattedTextField.caretBlinkRate", new Integer(500),
"FormattedTextField.font",
new FontUIResource("SansSerif", Font.PLAIN, 12),
"FormattedTextField.foreground", new ColorUIResource(Color.black),
"FormattedTextField.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("KP_UP"), "increment",
KeyStroke.getKeyStroke("END"), "caret-end-line",
KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
KeyStroke.getKeyStroke("KP_DOWN"), "decrement",
KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
KeyStroke.getKeyStroke("LEFT"), "caret-backward",
KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
KeyStroke.getKeyStroke("UP"), "increment",
KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
KeyStroke.getKeyStroke("ESCAPE"), "reset-field-edit",
KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
KeyStroke.getKeyStroke("DOWN"), "decrement",
KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard",
KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
KeyStroke.getKeyStroke("ctrl A"), "select-all",
KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
KeyStroke.getKeyStroke("shift END"), "selection-end-line",
KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
KeyStroke.getKeyStroke("DELETE"), "delete-next",
KeyStroke.getKeyStroke("ENTER"), "notify-field-accept",
KeyStroke.getKeyStroke("shift LEFT"), "selection-backward"
}),
"FormattedTextField.inactiveBackground", new ColorUIResource(light),
"FormattedTextField.inactiveForeground", new ColorUIResource(Color.gray),
"FormattedTextField.selectionBackground",
new ColorUIResource(Color.black),
"FormattedTextField.selectionForeground",
new ColorUIResource(Color.white),
"FormView.resetButtonText", "Reset",
"FormView.submitButtonText", "Submit Query",
"InternalFrame.activeTitleBackground", new ColorUIResource(0, 0, 128),
"InternalFrame.activeTitleForeground", new ColorUIResource(Color.white),
"InternalFrame.border",
new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults table)
{
Color lineColor = new Color(238, 238, 238);
Border inner = BorderFactory.createLineBorder(lineColor, 1);
Color shadowInner = new Color(184, 207, 229);
Color shadowOuter = new Color(122, 138, 153);
Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED,
Color.WHITE,
Color.WHITE,
shadowOuter,
shadowInner);
Border border = new BorderUIResource.CompoundBorderUIResource(outer,
inner);
return border;
}
},
"InternalFrame.borderColor", new ColorUIResource(light),
"InternalFrame.borderDarkShadow", new ColorUIResource(Color.BLACK),
"InternalFrame.borderHighlight", new ColorUIResource(Color.WHITE),
"InternalFrame.borderLight", new ColorUIResource(Color.LIGHT_GRAY),
"InternalFrame.borderShadow", new ColorUIResource(Color.GRAY),
"InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(),
"InternalFrame.icon",
new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults def)
{
return new IconUIResource(BasicIconFactory.createEmptyFrameIcon());
}
},
"InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(),
"InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.gray),
"InternalFrame.inactiveTitleForeground",
new ColorUIResource(Color.lightGray),
"InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(),
"InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(),
"InternalFrame.titleFont", new FontUIResource("Dialog", Font.BOLD, 12),
"InternalFrame.windowBindings", new Object[] {
"shift ESCAPE", "showSystemMenu",
"ctrl SPACE", "showSystemMenu",
"ESCAPE", "showSystemMenu"
},
"Label.background", new ColorUIResource(light),
"Label.disabledForeground", new ColorUIResource(Color.white),
"Label.disabledShadow", new ColorUIResource(shadow),
"Label.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"Label.foreground", new ColorUIResource(darkShadow),
"List.background", new ColorUIResource(Color.white),
"List.border", new BasicBorders.MarginBorder(),
"List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("ctrl DOWN"), "selectNextRowChangeLead",
KeyStroke.getKeyStroke("shift UP"), "selectPreviousRowExtendSelection",
KeyStroke.getKeyStroke("ctrl RIGHT"), "selectNextColumnChangeLead",
KeyStroke.getKeyStroke("shift ctrl LEFT"), "selectPreviousColumnExtendSelection",
KeyStroke.getKeyStroke("shift KP_UP"), "selectPreviousRowExtendSelection",
KeyStroke.getKeyStroke("DOWN"), "selectNextRow",
KeyStroke.getKeyStroke("ctrl UP"), "selectPreviousRowChangeLead",
KeyStroke.getKeyStroke("ctrl LEFT"), "selectPreviousColumnChangeLead",
KeyStroke.getKeyStroke("CUT"), "cut",
KeyStroke.getKeyStroke("END"), "selectLastRow",
KeyStroke.getKeyStroke("shift PAGE_UP"), "scrollUpExtendSelection",
KeyStroke.getKeyStroke("KP_UP"), "selectPreviousRow",
KeyStroke.getKeyStroke("shift ctrl UP"), "selectPreviousRowExtendSelection",
KeyStroke.getKeyStroke("ctrl HOME"), "selectFirstRowChangeLead",
KeyStroke.getKeyStroke("shift LEFT"), "selectPreviousColumnExtendSelection",
KeyStroke.getKeyStroke("ctrl END"), "selectLastRowChangeLead",
KeyStroke.getKeyStroke("ctrl PAGE_DOWN"), "scrollDownChangeLead",
KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selectNextColumnExtendSelection",
KeyStroke.getKeyStroke("LEFT"), "selectPreviousColumn",
KeyStroke.getKeyStroke("ctrl PAGE_UP"), "scrollUpChangeLead",
KeyStroke.getKeyStroke("KP_LEFT"), "selectPreviousColumn",
KeyStroke.getKeyStroke("shift KP_RIGHT"), "selectNextColumnExtendSelection",
KeyStroke.getKeyStroke("SPACE"), "addToSelection",
KeyStroke.getKeyStroke("ctrl SPACE"), "toggleAndAnchor",
KeyStroke.getKeyStroke("shift SPACE"), "extendTo",
KeyStroke.getKeyStroke("shift ctrl SPACE"), "moveSelectionTo",
KeyStroke.getKeyStroke("shift ctrl DOWN"), "selectNextRowExtendSelection",
KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "clearSelection",
KeyStroke.getKeyStroke("shift HOME"), "selectFirstRowExtendSelection",
KeyStroke.getKeyStroke("RIGHT"), "selectNextColumn",
KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "scrollUpExtendSelection",
KeyStroke.getKeyStroke("shift DOWN"), "selectNextRowExtendSelection",
KeyStroke.getKeyStroke("PAGE_DOWN"), "scrollDown",
KeyStroke.getKeyStroke("shift ctrl KP_UP"), "selectPreviousRowExtendSelection",
KeyStroke.getKeyStroke("shift KP_LEFT"), "selectPreviousColumnExtendSelection",
KeyStroke.getKeyStroke("ctrl X"), "cut",
KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "scrollDownExtendSelection",
KeyStroke.getKeyStroke("ctrl SLASH"), "selectAll",
KeyStroke.getKeyStroke("ctrl C"), "copy",
KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "selectNextColumnChangeLead",
KeyStroke.getKeyStroke("shift END"), "selectLastRowExtendSelection",
KeyStroke.getKeyStroke("shift ctrl KP_DOWN"), "selectNextRowExtendSelection",
KeyStroke.getKeyStroke("ctrl KP_LEFT"), "selectPreviousColumnChangeLead",
KeyStroke.getKeyStroke("HOME"), "selectFirstRow",
KeyStroke.getKeyStroke("ctrl V"), "paste",
KeyStroke.getKeyStroke("KP_DOWN"), "selectNextRow",
KeyStroke.getKeyStroke("ctrl KP_DOWN"), "selectNextRowChangeLead",
KeyStroke.getKeyStroke("shift RIGHT"), "selectNextColumnExtendSelection",
KeyStroke.getKeyStroke("ctrl A"), "selectAll",
KeyStroke.getKeyStroke("shift ctrl END"), "selectLastRowExtendSelection",
KeyStroke.getKeyStroke("COPY"), "copy",
KeyStroke.getKeyStroke("ctrl KP_UP"), "selectPreviousRowChangeLead",
KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selectPreviousColumnExtendSelection",
KeyStroke.getKeyStroke("shift KP_DOWN"), "selectNextRowExtendSelection",
KeyStroke.getKeyStroke("UP"), "selectPreviousRow",
KeyStroke.getKeyStroke("shift ctrl HOME"), "selectFirstRowExtendSelection",
KeyStroke.getKeyStroke("shift PAGE_DOWN"), "scrollDownExtendSelection",
KeyStroke.getKeyStroke("KP_RIGHT"), "selectNextColumn",
KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selectNextColumnExtendSelection",
KeyStroke.getKeyStroke("PAGE_UP"), "scrollUp",
KeyStroke.getKeyStroke("PASTE"), "paste"
}),
"List.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"List.foreground", new ColorUIResource(Color.black),
"List.selectionBackground", new ColorUIResource(0, 0, 128),
"List.selectionForeground", new ColorUIResource(Color.white),
"List.focusCellHighlightBorder",
new BorderUIResource.
LineBorderUIResource(new ColorUIResource(Color.yellow)),
"Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12),
"Menu.crossMenuMnemonic", Boolean.TRUE,
"Menu.acceleratorForeground", new ColorUIResource(darkShadow),
"Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white),
"Menu.arrowIcon", BasicIconFactory.getMenuArrowIcon(),
"Menu.background", new ColorUIResource(light),
"Menu.border", new BasicBorders.MarginBorder(),
"Menu.borderPainted", Boolean.FALSE,
"Menu.checkIcon", BasicIconFactory.getMenuItemCheckIcon(),
"Menu.consumesTabs", Boolean.TRUE,
"Menu.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"Menu.foreground", new ColorUIResource(darkShadow),
"Menu.margin", new InsetsUIResource(2, 2, 2, 2),
"Menu.selectedWindowInputMapBindings", new Object[] {
"ESCAPE", "cancel",
"DOWN", "selectNext",
"KP_DOWN", "selectNext",
"UP", "selectPrevious",
"KP_UP", "selectPrevious",
"LEFT", "selectParent",
"KP_LEFT", "selectParent",
"RIGHT", "selectChild",
"KP_RIGHT", "selectChild",
"ENTER", "return",
"SPACE", "return"
},
"Menu.menuPopupOffsetX", new Integer(0),
"Menu.menuPopupOffsetY", new Integer(0),
"Menu.submenuPopupOffsetX", new Integer(0),
"Menu.submenuPopupOffsetY", new Integer(0),
"Menu.selectionBackground", new ColorUIResource(Color.black),
"Menu.selectionForeground", new ColorUIResource(Color.white),
"MenuBar.background", new ColorUIResource(light),
"MenuBar.border", new BasicBorders.MenuBarBorder(null, null),
"MenuBar.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"MenuBar.foreground", new ColorUIResource(darkShadow),
"MenuBar.highlight", new ColorUIResource(highLight),
"MenuBar.shadow", new ColorUIResource(shadow),
"MenuBar.windowBindings", new Object[] {
"F10", "takeFocus"
},
"MenuItem.acceleratorDelimiter", "+",
"MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12),
"MenuItem.acceleratorForeground", new ColorUIResource(darkShadow),
"MenuItem.acceleratorSelectionForeground",
new ColorUIResource(Color.white),
"MenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(),
"MenuItem.background", new ColorUIResource(light),
"MenuItem.border", new BasicBorders.MarginBorder(),
"MenuItem.borderPainted", Boolean.FALSE,
"MenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"MenuItem.foreground", new ColorUIResource(darkShadow),
"MenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
"MenuItem.selectionBackground", new ColorUIResource(Color.black),
"MenuItem.selectionForeground", new ColorUIResource(Color.white),
"OptionPane.background", new ColorUIResource(light),
"OptionPane.border",
new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0),
"OptionPane.buttonAreaBorder",
new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0),
"OptionPane.buttonClickThreshhold", new Integer(500),
"OptionPane.cancelButtonText", "Cancel",
"OptionPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"OptionPane.foreground", new ColorUIResource(darkShadow),
"OptionPane.messageAreaBorder",
new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0),
"OptionPane.messageForeground", new ColorUIResource(darkShadow),
"OptionPane.minimumSize",
new DimensionUIResource(BasicOptionPaneUI.MinimumWidth,
BasicOptionPaneUI.MinimumHeight),
"OptionPane.noButtonText", "No",
"OptionPane.okButtonText", "OK",
"OptionPane.windowBindings", new Object[] {
"ESCAPE", "close"
},
"OptionPane.yesButtonText", "Yes",
"Panel.background", new ColorUIResource(light),
"Panel.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"Panel.foreground", new ColorUIResource(Color.black),
"PasswordField.background", new ColorUIResource(light),
"PasswordField.border", new BasicBorders.FieldBorder(null, null,
null, null),
"PasswordField.caretBlinkRate", new Integer(500),
"PasswordField.caretForeground", new ColorUIResource(Color.black),
"PasswordField.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12),
"PasswordField.foreground", new ColorUIResource(Color.black),
"PasswordField.inactiveBackground", new ColorUIResource(light),
"PasswordField.inactiveForeground", new ColorUIResource(Color.gray),
"PasswordField.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("END"), "caret-end-line",
KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
KeyStroke.getKeyStroke("LEFT"), "caret-backward",
KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-end-line",
KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-begin-line",
KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-begin-line",
KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-end-line",
KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard",
KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-end-line",
KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
KeyStroke.getKeyStroke("ctrl A"), "select-all",
KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
KeyStroke.getKeyStroke("ctrl LEFT"), "caret-begin-line",
KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-begin-line",
KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
KeyStroke.getKeyStroke("shift END"), "selection-end-line",
KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-end-line",
KeyStroke.getKeyStroke("DELETE"), "delete-next",
KeyStroke.getKeyStroke("ENTER"), "notify-field-accept",
KeyStroke.getKeyStroke("shift LEFT"), "selection-backward"
}),
"PasswordField.margin", new InsetsUIResource(0, 0, 0, 0),
"PasswordField.selectionBackground", new ColorUIResource(Color.black),
"PasswordField.selectionForeground", new ColorUIResource(Color.white),
"PopupMenu.background", new ColorUIResource(light),
"PopupMenu.border", new BorderUIResource.BevelBorderUIResource(0),
"PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"PopupMenu.foreground", new ColorUIResource(darkShadow),
"PopupMenu.selectedWindowInputMapBindings",
new Object[] {"ESCAPE", "cancel",
"DOWN", "selectNext",
"KP_DOWN", "selectNext",
"UP", "selectPrevious",
"KP_UP", "selectPrevious",
"LEFT", "selectParent",
"KP_LEFT", "selectParent",
"RIGHT", "selectChild",
"KP_RIGHT", "selectChild",
"ENTER", "return",
"SPACE", "return"
},
"PopupMenu.selectedWindowInputMapBindings.RightToLeft",
new Object[] {"LEFT", "selectChild",
"KP_LEFT", "selectChild",
"RIGHT", "selectParent",
"KP_RIGHT", "selectParent",
},
"ProgressBar.background", new ColorUIResource(Color.LIGHT_GRAY),
"ProgressBar.border",
new BorderUIResource.LineBorderUIResource(Color.GREEN, 2),
"ProgressBar.cellLength", new Integer(1),
"ProgressBar.cellSpacing", new Integer(0),
"ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"ProgressBar.foreground", new ColorUIResource(0, 0, 128),
"ProgressBar.selectionBackground", new ColorUIResource(0, 0, 128),
"ProgressBar.selectionForeground", new ColorUIResource(Color.LIGHT_GRAY),
"ProgressBar.repaintInterval", new Integer(50),
"ProgressBar.cycleTime", new Integer(3000),
"RadioButton.background", new ColorUIResource(light),
"RadioButton.border", BasicBorders.getRadioButtonBorder(),
"RadioButton.darkShadow", new ColorUIResource(shadow),
"RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("SPACE"), "pressed",
KeyStroke.getKeyStroke("released SPACE"), "released"
}),
"RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"RadioButton.foreground", new ColorUIResource(darkShadow),
"RadioButton.highlight", new ColorUIResource(highLight),
"RadioButton.icon",
new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults def)
{
return BasicIconFactory.getRadioButtonIcon();
}
},
"RadioButton.light", new ColorUIResource(highLight),
"RadioButton.margin", new InsetsUIResource(2, 2, 2, 2),
"RadioButton.shadow", new ColorUIResource(shadow),
"RadioButton.textIconGap", new Integer(4),
"RadioButton.textShiftOffset", new Integer(0),
"RadioButtonMenuItem.acceleratorFont",
new FontUIResource("Dialog", Font.PLAIN, 12),
"RadioButtonMenuItem.acceleratorForeground",
new ColorUIResource(darkShadow),
"RadioButtonMenuItem.acceleratorSelectionForeground",
new ColorUIResource(Color.white),
"RadioButtonMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(),
"RadioButtonMenuItem.background", new ColorUIResource(light),
"RadioButtonMenuItem.border", new BasicBorders.MarginBorder(),
"RadioButtonMenuItem.borderPainted", Boolean.FALSE,
"RadioButtonMenuItem.checkIcon", BasicIconFactory.getRadioButtonMenuItemIcon(),
"RadioButtonMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"RadioButtonMenuItem.foreground", new ColorUIResource(darkShadow),
"RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
"RadioButtonMenuItem.selectionBackground",
new ColorUIResource(Color.black),
"RadioButtonMenuItem.selectionForeground",
new ColorUIResource(Color.white),
"RootPane.defaultButtonWindowKeyBindings", new Object[] {
"ENTER", "press",
"released ENTER", "release",
"ctrl ENTER", "press",
"ctrl released ENTER", "release"
},
"ScrollBar.background", new ColorUIResource(224, 224, 224),
"ScrollBar.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
"PAGE_UP", "negativeBlockIncrement",
"PAGE_DOWN", "positiveBlockIncrement",
"END", "maxScroll",
"HOME", "minScroll",
"LEFT", "negativeUnitIncrement",
"KP_UP", "negativeUnitIncrement",
"KP_DOWN", "positiveUnitIncrement",
"UP", "negativeUnitIncrement",
"RIGHT", "positiveUnitIncrement",
"KP_LEFT", "negativeUnitIncrement",
"DOWN", "positiveUnitIncrement",
"KP_RIGHT", "positiveUnitIncrement"
}),
"ScrollBar.foreground", new ColorUIResource(light),
"ScrollBar.maximumThumbSize", new DimensionUIResource(4096, 4096),
"ScrollBar.minimumThumbSize", new DimensionUIResource(8, 8),
"ScrollBar.thumb", new ColorUIResource(light),
"ScrollBar.thumbDarkShadow", new ColorUIResource(shadow),
"ScrollBar.thumbHighlight", new ColorUIResource(highLight),
"ScrollBar.thumbShadow", new ColorUIResource(shadow),
"ScrollBar.track", new ColorUIResource(light),
"ScrollBar.trackHighlight", new ColorUIResource(shadow),
"ScrollBar.width", new Integer(16),
"ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
"PAGE_UP", "scrollUp",
"KP_LEFT", "unitScrollLeft",
"ctrl PAGE_DOWN", "scrollRight",
"PAGE_DOWN", "scrollDown",
"KP_RIGHT", "unitScrollRight",
"LEFT", "unitScrollLeft",
"ctrl END", "scrollEnd",
"UP", "unitScrollUp",
"RIGHT", "unitScrollRight",
"DOWN", "unitScrollDown",
"ctrl HOME", "scrollHome",
"ctrl PAGE_UP", "scrollLeft",
"KP_UP", "unitScrollUp",
"KP_DOWN", "unitScrollDown"
}),
"ScrollPane.background", new ColorUIResource(light),
"ScrollPane.border", new BorderUIResource.EtchedBorderUIResource(),
"ScrollPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"ScrollPane.foreground", new ColorUIResource(darkShadow),
"Separator.background", new ColorUIResource(highLight),
"Separator.foreground", new ColorUIResource(shadow),
"Separator.highlight", new ColorUIResource(highLight),
"Separator.shadow", new ColorUIResource(shadow),
"Slider.background", new ColorUIResource(light),
"Slider.focus", new ColorUIResource(shadow),
"Slider.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
"ctrl PAGE_DOWN", "negativeBlockIncrement",
"PAGE_DOWN", "negativeBlockIncrement",
"PAGE_UP", "positiveBlockIncrement",
"ctrl PAGE_UP", "positiveBlockIncrement",
"KP_RIGHT", "positiveUnitIncrement",
"DOWN", "negativeUnitIncrement",
"KP_LEFT", "negativeUnitIncrement",
"RIGHT", "positiveUnitIncrement",
"KP_DOWN", "negativeUnitIncrement",
"UP", "positiveUnitIncrement",
"KP_UP", "positiveUnitIncrement",
"LEFT", "negativeUnitIncrement",
"HOME", "minScroll",
"END", "maxScroll"
}),
"Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2),
"Slider.foreground", new ColorUIResource(light),
"Slider.highlight", new ColorUIResource(highLight),
"Slider.shadow", new ColorUIResource(shadow),
"Slider.thumbHeight", new Integer(20),
"Slider.thumbWidth", new Integer(11),
"Slider.tickHeight", new Integer(12),
"Slider.horizontalSize", new Dimension(200, 21),
"Slider.verticalSize", new Dimension(21, 200),
"Slider.minimumHorizontalSize", new Dimension(36, 21),
"Slider.minimumVerticalSize", new Dimension(21, 36),
"Spinner.background", new ColorUIResource(light),
"Spinner.foreground", new ColorUIResource(light),
"Spinner.arrowButtonSize", new DimensionUIResource(16, 5),
"Spinner.editorBorderPainted", Boolean.FALSE,
"Spinner.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12),
"SplitPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
"F6", "toggleFocus",
"F8", "startResize",
"END", "selectMax",
"HOME", "selectMin",
"LEFT", "negativeIncrement",
"KP_UP", "negativeIncrement",
"KP_DOWN", "positiveIncrement",
"UP", "negativeIncrement",
"RIGHT", "positiveIncrement",
"KP_LEFT", "negativeIncrement",
"DOWN", "positiveIncrement",
"KP_RIGHT", "positiveIncrement",
"shift ctrl pressed TAB", "focusOutBackward",
"ctrl pressed TAB", "focusOutForward"
}),
"SplitPane.background", new ColorUIResource(light),
"SplitPane.border", new BasicBorders.SplitPaneBorder(null, null),
"SplitPane.darkShadow", new ColorUIResource(shadow),
"SplitPane.dividerSize", new Integer(7),
"SplitPane.highlight", new ColorUIResource(highLight),
"SplitPane.shadow", new ColorUIResource(shadow),
"SplitPaneDivider.border", BasicBorders.getSplitPaneDividerBorder(),
"SplitPaneDivider.draggingColor", new ColorUIResource(Color.DARK_GRAY),
"TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
"ctrl PAGE_DOWN", "navigatePageDown",
"ctrl PAGE_UP", "navigatePageUp",
"ctrl UP", "requestFocus",
"ctrl KP_UP", "requestFocus"
}),
"TabbedPane.background", new ColorUIResource(192, 192, 192),
"TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3),
"TabbedPane.darkShadow", new ColorUIResource(Color.black),
"TabbedPane.focus", new ColorUIResource(Color.black),
"TabbedPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("ctrl DOWN"), "requestFocusForVisibleComponent",
KeyStroke.getKeyStroke("KP_UP"), "navigateUp",
KeyStroke.getKeyStroke("LEFT"), "navigateLeft",
KeyStroke.getKeyStroke("ctrl KP_DOWN"), "requestFocusForVisibleComponent",
KeyStroke.getKeyStroke("UP"), "navigateUp",
KeyStroke.getKeyStroke("KP_DOWN"), "navigateDown",
KeyStroke.getKeyStroke("KP_LEFT"), "navigateLeft",
KeyStroke.getKeyStroke("RIGHT"), "navigateRight",
KeyStroke.getKeyStroke("KP_RIGHT"), "navigateRight",
KeyStroke.getKeyStroke("DOWN"), "navigateDown"
}),
"TabbedPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"TabbedPane.foreground", new ColorUIResource(Color.black),
"TabbedPane.highlight", new ColorUIResource(Color.white),
"TabbedPane.light", new ColorUIResource(192, 192, 192),
"TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1),
"TabbedPane.shadow", new ColorUIResource(128, 128, 128),
"TabbedPane.tabsOpaque", Boolean.TRUE,
"TabbedPane.tabAreaInsets", new InsetsUIResource(3, 2, 0, 2),
"TabbedPane.tabInsets", new InsetsUIResource(0, 4, 1, 4),
"TabbedPane.tabRunOverlay", new Integer(2),
"TabbedPane.tabsOverlapBorder", Boolean.FALSE,
"TabbedPane.textIconGap", new Integer(4),
"Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
"ctrl DOWN", "selectNextRowChangeLead",
"ctrl RIGHT", "selectNextColumnChangeLead",
"ctrl UP", "selectPreviousRowChangeLead",
"ctrl LEFT", "selectPreviousColumnChangeLead",
"CUT", "cut",
"SPACE", "addToSelection",
"ctrl SPACE", "toggleAndAnchor",
"shift SPACE", "extendTo",
"shift ctrl SPACE", "moveSelectionTo",
"ctrl X", "cut",
"ctrl C", "copy",
"ctrl KP_RIGHT", "selectNextColumnChangeLead",
"ctrl KP_LEFT", "selectPreviousColumnChangeLead",
"ctrl V", "paste",
"ctrl KP_DOWN", "selectNextRowChangeLead",
"COPY", "copy",
"ctrl KP_UP", "selectPreviousRowChangeLead",
"PASTE", "paste",
"shift PAGE_DOWN", "scrollDownExtendSelection",
"PAGE_DOWN", "scrollDownChangeSelection",
"END", "selectLastColumn",
"shift END", "selectLastColumnExtendSelection",
"HOME", "selectFirstColumn",
"ctrl END", "selectLastRow",
"ctrl shift END", "selectLastRowExtendSelection",
"LEFT", "selectPreviousColumn",
"shift HOME", "selectFirstColumnExtendSelection",
"UP", "selectPreviousRow",
"RIGHT", "selectNextColumn",
"ctrl HOME", "selectFirstRow",
"shift LEFT", "selectPreviousColumnExtendSelection",
"DOWN", "selectNextRow",
"ctrl shift HOME", "selectFirstRowExtendSelection",
"shift UP", "selectPreviousRowExtendSelection",
"F2", "startEditing",
"shift RIGHT", "selectNextColumnExtendSelection",
"TAB", "selectNextColumnCell",
"shift DOWN", "selectNextRowExtendSelection",
"ENTER", "selectNextRowCell",
"KP_UP", "selectPreviousRow",
"KP_DOWN", "selectNextRow",
"KP_LEFT", "selectPreviousColumn",
"KP_RIGHT", "selectNextColumn",
"shift TAB", "selectPreviousColumnCell",
"ctrl A", "selectAll",
"shift ENTER", "selectPreviousRowCell",
"shift KP_DOWN", "selectNextRowExtendSelection",
"shift KP_LEFT", "selectPreviousColumnExtendSelection",
"ESCAPE", "cancel",
"ctrl shift PAGE_UP", "scrollLeftExtendSelection",
"shift KP_RIGHT", "selectNextColumnExtendSelection",
"ctrl PAGE_UP", "scrollLeftChangeSelection",
"shift PAGE_UP", "scrollUpExtendSelection",
"ctrl shift PAGE_DOWN", "scrollRightExtendSelection",
"ctrl PAGE_DOWN", "scrollRightChangeSelection",
"PAGE_UP", "scrollUpChangeSelection",
"ctrl shift LEFT", "selectPreviousColumnExtendSelection",
"shift KP_UP", "selectPreviousRowExtendSelection",
"ctrl shift UP", "selectPreviousRowExtendSelection",
"ctrl shift RIGHT", "selectNextColumnExtendSelection",
"ctrl shift KP_RIGHT", "selectNextColumnExtendSelection",
"ctrl shift DOWN", "selectNextRowExtendSelection",
"ctrl BACK_SLASH", "clearSelection",
"ctrl shift KP_UP", "selectPreviousRowExtendSelection",
"ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection",
"ctrl SLASH", "selectAll",
"ctrl shift KP_DOWN", "selectNextRowExtendSelection",
}),
"Table.background", new ColorUIResource(new ColorUIResource(255, 255, 255)),
"Table.focusCellBackground", new ColorUIResource(new ColorUIResource(255, 255, 255)),
"Table.focusCellForeground", new ColorUIResource(new ColorUIResource(0, 0, 0)),
"Table.focusCellHighlightBorder",
new BorderUIResource.LineBorderUIResource(
new ColorUIResource(255, 255, 0)),
"Table.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"Table.foreground", new ColorUIResource(new ColorUIResource(0, 0, 0)),
"Table.gridColor", new ColorUIResource(new ColorUIResource(128, 128, 128)),
"Table.scrollPaneBorder", new BorderUIResource.BevelBorderUIResource(0),
"Table.selectionBackground", new ColorUIResource(new ColorUIResource(0, 0, 128)),
"Table.selectionForeground", new ColorUIResource(new ColorUIResource(255, 255, 255)),
"TableHeader.background", new ColorUIResource(new ColorUIResource(192, 192, 192)),
"TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"TableHeader.foreground", new ColorUIResource(new ColorUIResource(0, 0, 0)),
"TextArea.background", new ColorUIResource(light),
"TextArea.border", new BorderUIResource(BasicBorders.getMarginBorder()),
"TextArea.caretBlinkRate", new Integer(500),
"TextArea.caretForeground", new ColorUIResource(Color.black),
"TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12),
"TextArea.foreground", new ColorUIResource(Color.black),
"TextArea.inactiveForeground", new ColorUIResource(Color.gray),
"TextArea.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("shift UP"), "selection-up",
KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
KeyStroke.getKeyStroke("shift KP_UP"), "selection-up",
KeyStroke.getKeyStroke("DOWN"), "caret-down",
KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action",
KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
KeyStroke.getKeyStroke("END"), "caret-end-line",
KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up",
KeyStroke.getKeyStroke("KP_UP"), "caret-up",
KeyStroke.getKeyStroke("DELETE"), "delete-next",
KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin",
KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
KeyStroke.getKeyStroke("ctrl END"), "caret-end",
KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
KeyStroke.getKeyStroke("LEFT"), "caret-backward",
KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action",
KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
KeyStroke.getKeyStroke("ENTER"), "insert-break",
KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left",
KeyStroke.getKeyStroke("shift DOWN"), "selection-down",
KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down",
KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right",
KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
KeyStroke.getKeyStroke("shift END"), "selection-end-line",
KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
KeyStroke.getKeyStroke("KP_DOWN"), "caret-down",
KeyStroke.getKeyStroke("ctrl A"), "select-all",
KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
KeyStroke.getKeyStroke("shift ctrl END"), "selection-end",
KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
KeyStroke.getKeyStroke("ctrl T"), "next-link-action",
KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down",
KeyStroke.getKeyStroke("TAB"), "insert-tab",
KeyStroke.getKeyStroke("UP"), "caret-up",
KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin",
KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down",
KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
KeyStroke.getKeyStroke("PAGE_UP"), "page-up",
KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard"
}),
"TextArea.margin", new InsetsUIResource(0, 0, 0, 0),
"TextArea.selectionBackground", new ColorUIResource(Color.black),
"TextArea.selectionForeground", new ColorUIResource(Color.white),
"TextField.background", new ColorUIResource(light),
"TextField.border", new BasicBorders.FieldBorder(null, null, null, null),
"TextField.caretBlinkRate", new Integer(500),
"TextField.caretForeground", new ColorUIResource(Color.black),
"TextField.darkShadow", new ColorUIResource(shadow),
"TextField.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
"TextField.foreground", new ColorUIResource(Color.black),
"TextField.highlight", new ColorUIResource(highLight),
"TextField.inactiveBackground", new ColorUIResource(Color.LIGHT_GRAY),
"TextField.inactiveForeground", new ColorUIResource(Color.GRAY),
"TextField.light", new ColorUIResource(highLight),
"TextField.highlight", new ColorUIResource(light),
"TextField.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("ENTER"), "notify-field-accept",
KeyStroke.getKeyStroke("LEFT"), "caret-backward",
KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
KeyStroke.getKeyStroke("END"), "caret-end-line",
KeyStroke.getKeyStroke("DELETE"), "delete-next",
KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard",
KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
KeyStroke.getKeyStroke("ctrl A"), "select-all",
KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
KeyStroke.getKeyStroke("shift END"), "selection-end-line",
KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word"
}),
"TextField.margin", new InsetsUIResource(0, 0, 0, 0),
"TextField.selectionBackground", new ColorUIResource(Color.black),
"TextField.selectionForeground", new ColorUIResource(Color.white),
"TextPane.background", new ColorUIResource(Color.white),
"TextPane.border", BasicBorders.getMarginBorder(),
"TextPane.caretBlinkRate", new Integer(500),
"TextPane.caretForeground", new ColorUIResource(Color.black),
"TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12),
"TextPane.foreground", new ColorUIResource(Color.black),
"TextPane.inactiveForeground", new ColorUIResource(Color.gray),
"TextPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("shift UP"), "selection-up",
KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
KeyStroke.getKeyStroke("shift KP_UP"), "selection-up",
KeyStroke.getKeyStroke("DOWN"), "caret-down",
KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action",
KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
KeyStroke.getKeyStroke("END"), "caret-end-line",
KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up",
KeyStroke.getKeyStroke("KP_UP"), "caret-up",
KeyStroke.getKeyStroke("DELETE"), "delete-next",
KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin",
KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
KeyStroke.getKeyStroke("ctrl END"), "caret-end",
KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
KeyStroke.getKeyStroke("LEFT"), "caret-backward",
KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action",
KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
KeyStroke.getKeyStroke("ENTER"), "insert-break",
KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left",
KeyStroke.getKeyStroke("shift DOWN"), "selection-down",
KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down",
KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right",
KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
KeyStroke.getKeyStroke("shift END"), "selection-end-line",
KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
KeyStroke.getKeyStroke("KP_DOWN"), "caret-down",
KeyStroke.getKeyStroke("ctrl A"), "select-all",
KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
KeyStroke.getKeyStroke("shift ctrl END"), "selection-end",
KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
KeyStroke.getKeyStroke("ctrl T"), "next-link-action",
KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down",
KeyStroke.getKeyStroke("TAB"), "insert-tab",
KeyStroke.getKeyStroke("UP"), "caret-up",
KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin",
KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down",
KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
KeyStroke.getKeyStroke("PAGE_UP"), "page-up",
KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard"
}),
"TextPane.margin", new InsetsUIResource(3, 3, 3, 3),
"TextPane.selectionBackground", new ColorUIResource(Color.black),
"TextPane.selectionForeground", new ColorUIResource(Color.white),
"TitledBorder.border", new BorderUIResource.EtchedBorderUIResource(),
"TitledBorder.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"TitledBorder.titleColor", new ColorUIResource(darkShadow),
"ToggleButton.background", new ColorUIResource(light),
"ToggleButton.border",
new BorderUIResource.CompoundBorderUIResource(null, null),
"ToggleButton.darkShadow", new ColorUIResource(shadow),
"ToggleButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("SPACE"), "pressed",
KeyStroke.getKeyStroke("released SPACE"), "released"
}),
"ToggleButton.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"ToggleButton.foreground", new ColorUIResource(darkShadow),
"ToggleButton.highlight", new ColorUIResource(highLight),
"ToggleButton.light", new ColorUIResource(light),
"ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14),
"ToggleButton.shadow", new ColorUIResource(shadow),
"ToggleButton.textIconGap", new Integer(4),
"ToggleButton.textShiftOffset", new Integer(0),
"ToolBar.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
"UP", "navigateUp",
"KP_UP", "navigateUp",
"DOWN", "navigateDown",
"KP_DOWN", "navigateDown",
"LEFT", "navigateLeft",
"KP_LEFT", "navigateLeft",
"RIGHT", "navigateRight",
"KP_RIGHT", "navigateRight"
}),
"ToolBar.background", new ColorUIResource(light),
"ToolBar.border", new BorderUIResource.EtchedBorderUIResource(),
"ToolBar.darkShadow", new ColorUIResource(shadow),
"ToolBar.dockingBackground", new ColorUIResource(light),
"ToolBar.dockingForeground", new ColorUIResource(Color.red),
"ToolBar.floatingBackground", new ColorUIResource(light),
"ToolBar.floatingForeground", new ColorUIResource(Color.darkGray),
"ToolBar.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"ToolBar.foreground", new ColorUIResource(darkShadow),
"ToolBar.highlight", new ColorUIResource(highLight),
"ToolBar.light", new ColorUIResource(highLight),
"ToolBar.separatorSize", new DimensionUIResource(10, 10),
"ToolBar.shadow", new ColorUIResource(shadow),
"ToolTip.background", new ColorUIResource(light),
"ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray),
"ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
"ToolTip.foreground", new ColorUIResource(darkShadow),
"Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
"ESCAPE", "cancel"
}),
"Tree.background", new ColorUIResource(new Color(255, 255, 255)),
"Tree.changeSelectionWithFocus", Boolean.TRUE,
"Tree.drawsFocusBorderAroundIcon", Boolean.FALSE,
"Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray),
"Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("ctrl DOWN"), "selectNextChangeLead",
KeyStroke.getKeyStroke("shift UP"), "selectPreviousExtendSelection",
KeyStroke.getKeyStroke("ctrl RIGHT"), "scrollRight",
KeyStroke.getKeyStroke("shift KP_UP"), "selectPreviousExtendSelection",
KeyStroke.getKeyStroke("DOWN"), "selectNext",
KeyStroke.getKeyStroke("ctrl UP"), "selectPreviousChangeLead",
KeyStroke.getKeyStroke("ctrl LEFT"), "scrollLeft",
KeyStroke.getKeyStroke("CUT"), "cut",
KeyStroke.getKeyStroke("END"), "selectLast",
KeyStroke.getKeyStroke("shift PAGE_UP"), "scrollUpExtendSelection",
KeyStroke.getKeyStroke("KP_UP"), "selectPrevious",
KeyStroke.getKeyStroke("shift ctrl UP"), "selectPreviousExtendSelection",
KeyStroke.getKeyStroke("ctrl HOME"), "selectFirstChangeLead",
KeyStroke.getKeyStroke("ctrl END"), "selectLastChangeLead",
KeyStroke.getKeyStroke("ctrl PAGE_DOWN"), "scrollDownChangeLead",
KeyStroke.getKeyStroke("LEFT"), "selectParent",
KeyStroke.getKeyStroke("ctrl PAGE_UP"), "scrollUpChangeLead",
KeyStroke.getKeyStroke("KP_LEFT"), "selectParent",
KeyStroke.getKeyStroke("SPACE"), "addToSelection",
KeyStroke.getKeyStroke("ctrl SPACE"), "toggleAndAnchor",
KeyStroke.getKeyStroke("shift SPACE"), "extendTo",
KeyStroke.getKeyStroke("shift ctrl SPACE"), "moveSelectionTo",
KeyStroke.getKeyStroke("ADD"), "expand",
KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "clearSelection",
KeyStroke.getKeyStroke("shift ctrl DOWN"), "selectNextExtendSelection",
KeyStroke.getKeyStroke("shift HOME"), "selectFirstExtendSelection",
KeyStroke.getKeyStroke("RIGHT"), "selectChild",
KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "scrollUpExtendSelection",
KeyStroke.getKeyStroke("shift DOWN"), "selectNextExtendSelection",
KeyStroke.getKeyStroke("PAGE_DOWN"), "scrollDownChangeSelection",
KeyStroke.getKeyStroke("shift ctrl KP_UP"), "selectPreviousExtendSelection",
KeyStroke.getKeyStroke("SUBTRACT"), "collapse",
KeyStroke.getKeyStroke("ctrl X"), "cut",
KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "scrollDownExtendSelection",
KeyStroke.getKeyStroke("ctrl SLASH"), "selectAll",
KeyStroke.getKeyStroke("ctrl C"), "copy",
KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "scrollRight",
KeyStroke.getKeyStroke("shift END"), "selectLastExtendSelection",
KeyStroke.getKeyStroke("shift ctrl KP_DOWN"), "selectNextExtendSelection",
KeyStroke.getKeyStroke("ctrl KP_LEFT"), "scrollLeft",
KeyStroke.getKeyStroke("HOME"), "selectFirst",
KeyStroke.getKeyStroke("ctrl V"), "paste",
KeyStroke.getKeyStroke("KP_DOWN"), "selectNext",
KeyStroke.getKeyStroke("ctrl A"), "selectAll",
KeyStroke.getKeyStroke("ctrl KP_DOWN"), "selectNextChangeLead",
KeyStroke.getKeyStroke("shift ctrl END"), "selectLastExtendSelection",
KeyStroke.getKeyStroke("COPY"), "copy",
KeyStroke.getKeyStroke("ctrl KP_UP"), "selectPreviousChangeLead",
KeyStroke.getKeyStroke("shift KP_DOWN"), "selectNextExtendSelection",
KeyStroke.getKeyStroke("UP"), "selectPrevious",
KeyStroke.getKeyStroke("shift ctrl HOME"), "selectFirstExtendSelection",
KeyStroke.getKeyStroke("shift PAGE_DOWN"), "scrollDownExtendSelection",
KeyStroke.getKeyStroke("KP_RIGHT"), "selectChild",
KeyStroke.getKeyStroke("F2"), "startEditing",
KeyStroke.getKeyStroke("PAGE_UP"), "scrollUpChangeSelection",
KeyStroke.getKeyStroke("PASTE"), "paste"
}),
"Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"Tree.foreground", new ColorUIResource(Color.black),
"Tree.hash", new ColorUIResource(new Color(184, 207, 228)),
"Tree.leftChildIndent", new Integer(7),
"Tree.rightChildIndent", new Integer(13),
"Tree.rowHeight", new Integer(16),
"Tree.scrollsOnExpand", Boolean.TRUE,
"Tree.selectionBackground", new ColorUIResource(Color.black),
"Tree.nonSelectionBackground", new ColorUIResource(new Color(255, 255, 255)),
"Tree.selectionBorderColor", new ColorUIResource(Color.black),
"Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(Color.black),
"Tree.selectionForeground", new ColorUIResource(new Color(255, 255, 255)),
"Viewport.background", new ColorUIResource(light),
"Viewport.foreground", new ColorUIResource(Color.black),
"Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12)
};
defaults.putDefaults(uiDefaults);
}
/**
* Returns the <code>ActionMap</code> that stores all the actions that are
* responsibly for rendering auditory cues.
*
* @return the action map that stores all the actions that are
* responsibly for rendering auditory cues
*
* @see #createAudioAction
* @see #playSound
*
* @since 1.4
*/
protected ActionMap getAudioActionMap()
{
if (audioActionMap != null)
audioActionMap = new ActionMap();
return audioActionMap;
}
/**
* Creates an <code>Action</code> that can play an auditory cue specified by
* the key. The UIDefaults value for the key is normally a String that points
* to an audio file relative to the current package.
*
* @param key a UIDefaults key that specifies the sound
*
* @return an action that can play the sound
*
* @see #playSound
*
* @since 1.4
*/
protected Action createAudioAction(Object key)
{
return new AudioAction(key);
}
/**
* Plays the sound of the action if it is listed in
* <code>AuditoryCues.playList</code>.
*
* @param audioAction the audio action to play
*
* @since 1.4
*/
protected void playSound(Action audioAction)
{
if (audioAction instanceof AudioAction)
{
Object[] playList = (Object[]) UIManager.get("AuditoryCues.playList");
for (int i = 0; i < playList.length; ++i)
{
if (playList[i].equals(((AudioAction) audioAction).key))
{
ActionEvent ev = new ActionEvent(this,
ActionEvent.ACTION_PERFORMED,
(String) playList[i]);
audioAction.actionPerformed(ev);
break;
}
}
}
}
/**
* Initializes the Look and Feel.
*/
public void initialize()
{
Toolkit toolkit = Toolkit.getDefaultToolkit();
popupHelper = new PopupHelper();
toolkit.addAWTEventListener(popupHelper, AWTEvent.MOUSE_EVENT_MASK);
}
/**
* Uninitializes the Look and Feel.
*/
public void uninitialize()
{
Toolkit toolkit = Toolkit.getDefaultToolkit();
toolkit.removeAWTEventListener(popupHelper);
popupHelper = null;
}
}
|