-
- Weitere Informationen zu diesem Buch:
Inhaltsverzeichnis | Index | Probekapitel | Kolophon | Rezensionen |
Beispiele |
- Weitere Informationen zu diesem Buch:
Second Edition November 2002
ISBN 978-0-596-00408-8
Weitere Informationen zu diesem Buch
Inhaltsverzeichnis |
Index |
Probekapitel |
Kolophon |
Rezensionen |
Beispiele |
Index
[ Numbers ], [ A ], [ B ], [ C ], [ D ], [ E ], [ F ], [ G ], [ H ], [ I ], [ J ], [ K ], [ L ], [ M ], [ N ], [ O ], [ P ], [ Q ], [ R ], [ S ], [ T ], [ U ], [ V ], [ W ], [ X ], [ Y ], [ Z ]
A[ Top ]
Abstract Windowing Toolkit (see AWT)
AbstractAction class, 44-48
properties table for, 45
AbstractBorder class, 407, 409
custom borders and, 429
properties table for, 410
AbstractButton class, 106-111
facilitating manager for, 348
menus and, 433
AbstractColorChooserPanel class, 394-395
properties table for, 394
AbstractDocument class, 803-808
Content interface, 825
GapContent class, 827
inner classes/interfaces of, 803
PlainDocument class, 808-810
properties table for, 804
StringContent class, 826
AbstractLayoutCache class, 631
AbstractListModel class, 162, 165
AbstractSpinnerModel class, 213
AbstractTableModel class, 508-512, 542
PagingModel.java (example), 544-547
properties table for, 509
AbstractUndoableEdit class, 638-644
examples of, 640-644, 658-660
properties table for, 639
AbstractUndoableEdit interface, 634
AbstractWriter class, 901-903
properties table for, 901
accelerator keys, labels and, 86
accelerator property (JMenuItem), 448
accelerators (see keyboard accelerators)
accept( )
FileFilter class, 381
JFileChooser class, 379
acceptAllFileFilter property (JFileChooser), 371
acceptAllFileFilterUsed property (JFileChooser), 370
acceptDrag( )
copy/move actions and, 961
DropTargetDragEvent class, 927
acceptDrop( ) (DropTargetDropEvent), 928
accessibility, 75, 967-1008
examples of, 993-995, 1003-1006
hierarchy of, 975
how it works, 968-972
interfacing with, 1003-1007
Java Accessibility Helper for, 1007
javax.accessibility package for, 10
multiple L&F support for, 1037
types of, 982-996
utility classes for, 996-1003
Accessibility API, 2
Accessibility package, 972-977
accessibility roles, 980
accessibility.properties file, 969
Accessible interface, 973
AccessibleAction interface, 983
accessibleAction property (AccessibleContext), 975
accessibleActionAnchor property (AccessibleHyperlink), 989
accessibleActionCount property (AccessibleHyperlink), 989
accessibleActionDescription property (AccessibleHyperlink), 989
accessibleActionObject property (AccessibleHyperlink), 989
accessibleAt property (AccessibleTable), 992
accessibleChild property (AccessibilityContext), 976
accessibleChildrenCount property (AccessibilityContext), 976
accessibleChildSelected property (AccessibleSelection), 985
accessibleColumnExtentAt property (AccessibleTable), 992
AccessibleComponent interface, 983-985
properties table for, 984
accessibleComponent property (AccessibleContext), 975
AccessibleContext class, 974-977
properties table for, 974
accessibleContext property
JComponent class, 57
JEditorPane class, 851
JFormattedTextField class, 711
JFrame class, 247
JPasswordField class, 698
JTextComponent class, 686
JTextField class, 692
accessibleDescription property (AccessibleContext), 974-976
AccessibleExtendedComponent interface, 993
AccessibleExtendedTable interface, 993
AccessibleHyperlink class, 988
properties table for, 989
AccessibleHypertext interface, 975, 988
AccessibleIcon interface, 990
properties table for, 991
accessibleIconDescription property (AccessibleIcon), 990
accessibleIndexInParent property (AccessibilityContext), 976
AccessibleKeyBindings interface, 993
accessibleName property (AccessibleContext), 974-976
accessibleParent property (AccessibleContext), 975
AccessibleRelation class, 993
AccessibleRelationSet class, 993
AccessibleRole class, 980-982
accessibleRole property (AccessibleContext), 975
accessibleRowExtentAt property (AccessibleTable), 992
AccessibleSelection interface, 985
properties table for, 986
accessibleSelection property
AccessibleContext class, 975
AccessibleSelection interface, 985
accessibleSelectionCount property (AccessibleSelection), 985
AccessibleState class, 978
AccessibleStateSet class, 979
accessibleStateSet property (AccessibleContext), 975
AccessibleTable interface, 992
AccessibleText interface, 986-987, 991
properties table for, 987
accessibleText property (AccessibleContext), 975
AccessibleValue interface, 989
accessibleValue property (AccessibleContext), 975
accessor methods, 19, 1144
for fonts/colors, 784
get/set/is, 1136
JTree class, 585
StyleContext class, 782
accessory property (JFileChooser), 372
AccessoryFileChooser.java (example), 375
action events, buttons and, 103, 114
Action interface, 4, 42-44
AbstractAction class, 44-48
properties table for, 43
action property
AbstractButton class, 108
JComboBox class, 204
JTextField class, 692
actionCommand property
AbstractButton class, 109
ButtonModel interface, 101-102
JButton class, 28
JComboBox class, 204
JTextField class, 692
ActionExampleButton.java (example), 993-995
ActionExample.java (example), 46-47
ActionListener interface, 28, 42
ActionMap class, 82-83
properties table for, 82
actionMap property (JComponent), 74
actionPerformed( ), 28, 30
Action interface, 44
AddFrameAction.java (example), 278
AlignmentAction class, 874
BeepAction class, 863
BoldAction class, 874
CopyAction class, 864
CutAction class, 864
DefaultKeyTypedAction class, 863
DropTargetAutoScroller class, 966
FontFamilyAction class, 873
FontSizeAction class, 873
ForegroundAction class, 873
InsertBreakAction class, 864
InsertContentAction class, 864
InsertTabAction class, 864
ItalicAction class, 874
JComboBox class, 206
JList class, 161
PasteAction class, 864
UnderlineAction class, 874
actions, 41-48, 861, 863
AbstractAction class, 44-48
AccessibleAction interface, 983
Action interface, 42-44
ActionListener interface, 28, 42
AlignmentAction class, 873
BeepAction class, 863
BoldAction class, 874
CopyAction class, 37, 864
custom, creating, 909
CutAction class, 864
default, 870
DefaultEditorKit and, 859-861
DefaultKeyTypedAction class, 863
disabling, 47
examples of, 46-47, 277-284, 861, 993-995
FontFamilyAction class, 873
FontSizeAction class, 873
ForegoundAction class, 873
for hyperlinks, 898
InsertBreakAction class, 864
InsertContentAction class, 864
InsertTabAction class, 864
ItalicAction class, 874
JComponent class descendants and, 1170-1192
for menu items/toolbars, creating, 45-47
PasteAction class, 864
StyledEditorKit and, 870
StyledTextAction class, 871
TextAction class, 857
UnderlineAction class, 874
actions property
DefaultEditorKit class, 858
EditorKit class, 855
HTMLEditorKit class, 890
JFormattedTextField class, 712
JTextComponent class, 686
JTextField class, 693
StyledEditorKit class, 869
activateFrame( )
DefaultDesktopManager class, 273
DesktopManager interface, 272
active component (see focus)
active property (DropTarget), 921
ActiveValue interface, 1015, 1022
activeWindow property (KeyboardFocusManager), 1111
add( ), 41
AccessibleStateSet class, 980
ButtonGroup class, 128, 131
DefaultMutableTreeNode class, 597
EventListenerList class, 1092
JComponent class, 55
JFrame class, 247
JLayeredPane class, 243
JMenu class, 462, 464
JMenuBar class, 439, 442
JPopupMenu class, 453, 457
JTabbedPane class, 337
JToolBar class, 485
addAccessibleSelection( ) (AccessibleSelection), 986
addActionForKeyStroke( ) (Keymap), 756
addActionListener( )
AbstractButton class, 109
ButtonModel interface, 104
ComboBoxEditor interface, 198
DefaultButtonModel class, 105
JComboBox class, 204
JFileChooser class, 376
JTextField class, 694
Timer class, 1083
addAdjustmentListener( ) (JScrollBar), 141
addAll( ) (AccessibleStateSet), 980
addAncestorListener( ) (Component), 76
addAttribute( )
MutableAttributeSet interface, 770
SimpleAttributeSet class, 773
StyleContext class, 783
addAttributes( )
MutableAttributeSet interface, 770
SimpleAttributeSet class, 773
StyleContext class, 783
addAuxiliaryLookAndFeel( ) (UIManager), 1032
addCaretListener( ) (JTextComponent), 687
addCellEditorListener( )
CellEditor interface, 534
DefaultTreeCellEditor class, 625
addChangeListener( )
AbstractButton class, 109
BoundedRangeModel interface, 134
ButtonModel interface, 104
Caret interface, 737
ColorSelectionModel interface, 390
DefaultBoundedRangeModel class, 135
DefaultButtonModel class, 105
JProgressBar class, 150, 210
JSlider class, 146
JTabbedPane class, 336
JViewport class, 332
SingleSectionModel interface, 438
SpinnerModel interface, 213
Style interface, 771
StyleContext class, 782
addChoosableFileFilter( ) (JFileChooser), 379
addChooserPanel( ) (JColorChooser), 393
addColumn( )
DefaultTableColumnModel class, 504
DefaultTableModel class, 514
TableColumnModel interface, 502
addColumnModelListener( )
DefaultTableColumnModel class, 504
TableColumnModel interface, 502
addColumnSelectionInterval( ) (JTable), 498, 525
addCustomEntriesToTable( ) (MetalTheme), 1049
addDirtyRegion( ) (RepaintManager), 1129, 1131
addDocumentListener( )
AbstractDocument class, 804
Document interface, 801
addDragGestureListener( ) (DragGestureRecognizer), 936
addDragSourceListener( )
DragSource class, 943
DragSourceContext class, 946
addDragSourceMotionListener( ) (DragSource), 943
addDropTargetListener( ) (DropTarget), 922
addEdit( )
AbstractUndoableEditor class, 640
CompoundEdit class, 646
UndoableEdit interface, 637
UndoManager class, 654
addElement( )
DefaultComboBoxModel class, 196
DefaultListModel class, 168
MutableComboBoxModel interface, 195
addElementAt( ) (DefaultComboBoxModel), 197
addFocusListener( ) (AccessibleComponent), 985
AddFrameAction.java (example), 278
addGUIInitializedListener( ) (EventQueueMonitor), 998
addHighlight( )
DefaultHighlighter class, 753
Hightlighter interface, 750
addHyperlinkListener( ) (JEditorPane), 852
addImpl( )
JFrame class, 247
JLayeredPane class, 244
addInternalFrameListener( ) (JInternalFrame), 264
addInvalidComponent( ) (RepaintManager), 1129, 1131
addItem( ) (JComboBox), 201, 206
addItemListener( )
AbstractButton class, 109
ButtonModel interface, 104
DefaultButtonModel class, 105
JComboBox class, 204
addKeymap( ) (JTextComponent), 690
addListDataListener( ) (ListModel), 164
addListSelectionListener( )
DefaultListSelectionModel interface, 177
JList class, 191
ListSelectionModel interface, 176
addMenuListener( ) (JMenu), 466
addPopupMenuListener( )
JComboBox class, 205
JPopupMenu class, 456
addPropertyChangeListener( )
AbstractAction class, 45
AccessibleContext class, 976-977
Action interface, 44
Component class, 76
PropertyChangeListener class, 608
SwingPropertyChangeSupport class, 1101
TableColumn class, 500
TreeSelectionModel interface, 606
UIDefaults class, 1020
UIManager class, 1031
add/remove methods, 773
addResourceBundle( ) (UIDefaults), 1021
addRow( ) (DefaultTableModel), 514
addRowSelectionInterval( ) (JTable), 498, 525
addSelectionInterval( )
JList class, 190
JTree class, 589
ListSelectionModel interface, 175
addSelectionPath( )
JTree class, 590
TreeSelectionModel interface, 607
addSelectionPaths( )
JTree class, 590
TreeSelectionModel interface, 607
addSelectionRow( ) (JTree), 590
addSelectionRows( ) (JTree), 590
addSeparator( )
JMenu class, 462
JPopupMenu class, 453, 457
JSeparator class, 476-478
JToolBar class, 483, 485
addStyle( )
JTextPane class, 765
StyleContext class, 784
StyledDocument interface, 812, 816
addTab( ) (JTabbedPane), 333, 337
addTableModelListener( )
AbstractTableModel class, 511
TableModel interface, 508
addTopLevelWindowListener( ) (EventQueueMonitor), 998, 1002
addTreeExpansionListener( ) (JTree), 586
addTreeModelListener( )
DefaultTreeModel class, 575
TreeModel interface, 573
addTreeSelectionListener( )
DefaultTreeSelectionModel class, 608
JTree class, 586
TreeSelectionModel interface, 606
addTreeWillExpandListener( ) (JTree), 586
addUndoableEditListener( )
AbstractDocument class, 804
Document interface, 801
UndoableEditSupport class, 674
addVetoableChangeListener( ) (Component), 76
adjustSizes( ) (SizeRequirements), 353
adjustVisibility( ) (DefaultCaret), 740
algebraic expression tree model (example), 622, 628
alignment, 348
AlignmentAction class, 873
AlignmentExample.java (example), 88
of button content, 108
of components, 63-65
of labels, 86, 88
of menu item images, 445
of tab stops, 794
of text, actions for, 869
point values for, 348
alignment property
TabStop class, 794
View class, 835
AlignmentAction class, 873
AlignmentExample.java (example), 88
alignmentX, alignmentY properties (JComponent), 57, 65
boxes and, 347
alive/done properties, 638-640
allFrames property (JDesktopPane), 270
allKeys( )
ActionMap class, 83
InputMap class, 81
allocation, 833
allowsChildren property (TreeNode ), 594
allowsInvalid property
DefaultFormatter class, 717
MaskFormatter class, 723
AlphaButtonFocusManager.java (example), 1113-1115
ancestor/descendant components, 53
AncestorEvent events, 75
AncestorListener interface, 76
ancestors, trees and, 571
anchored menus, 461-469
JMenu class, 461-468
MenuListener interface, 469
anchors, lists and, 161
anchorSelectionIndex property
JList class, 188
ListSelectionModel interface, 173
anchorSelectionIndex property (DefaultListSelectionModel), 176
anchorSelectionPath property (JTree), 585
AnimationApplet.java (example), 98
append( )
JTextArea class, 703
View class, 839
appendEvent( ) (DragGestureRecognizer), 937
<applet> tag (HTML), 255
applets, 4
JApplet class, 254-258
viewers for, 254
warning messages and, 256
application frame, 35
applications
components, adding to/upgrading, 22-30
web-site manager (example), 34-40
approveButtonMnemonic property (JFileChooser), 372
approveButtonText property (JFileChooser), 372
approveButtonToolTipText property (JFileChooser), 372
approveSelection( ) (JFileChooser), 376
armed property
ButtonModel interface, 103
JMenuItem class, 448
arrays, defining for L&F, 1062
arrow buttons, scrollbars and, 138
asksAllowsChildren property (DefaultTreeModel), 574
assistive technologies (see accessibility)
AssistiveExample.java (example), 1003-1006
AsyncBoxView class, 842
asynchronousLoad property (AbstractDocument), 804
attribute keys, 774-778
attribute methods, 762
attribute sets, 766-797
attribute values, 778
AttributeContext class (AbstractDocument), 803
AttributeContext methods, 783
attributeCount property
AttributeSet interface, 768
SimpleAttributeSet class, 772
AttributeElement class (AbstractDocument), 803
attributeNames property
AttributeSet interface, 768
SimpleAttributeSet class, 772
attributes property
Element interface, 798
View class, 835
AttributeSet interface, 766-769
properties table for, 768
audio
actions for, 1041-1043
examples of, 373-375, 549-556
player for, 372
AudioAccessory.java (example), 373-375
auditory cues, 1041-1043, 1192
augmentList( ) (TextAction), 857
autoCreateColumnsFromModel property (JTable), 492
autoResizeMode property (JTable), 492
autoscroll boundaries, 962
Autoscroll interface, 963-965
autoscroll( ) (Autoscroll interface), 963, 965
autoscrolling, 63, 962-965
autoscrolls property (JComponent), 57, 63
AutoscrollTest.java (example), 963
auxiliary L&Fs, 1029
AWT (Abstract Windowing Toolkit), 2-5
accessibility and, 968-972, 982
AWTEventMonitor class, 999
Drag and Drop functionality and, 912
Swing and, 52
mixing with, 1125-1128
replacing components with Swing components, 20-30
vs. Swing class hierarchy, 11
AWTEventMonitor class, 999
awt.properties file, 969, 997
axes, 834
B[ Top ]
background images, 276
background property
AccessibleComponent interface, 983
DefaultTableCellRenderer class, 531
JComponent class, 54
JInternalFrame class, 262
JRootPane class, 235
backingStoreEnabled property (JViewport), 331
BadLocationException class, 830
base property
HTMLDocument class, 893
StyleSheet class, 896
baseFontSize property (StyleSheet), 896
BasicGraphicsUtils class, 1067
BasicJogShuttleUI.java (example), 1150-1152
BasicLookAndFeel class, 1016
component UI resources defined by (list), 1157-1169
BeepAction class, 863
beginDraggingFrame( )
DefaultDesktopManager class, 274
DesktopManager interface, 272
beginIndex property (Segment), 823
beginResizingFrame( )
DefaultDesktopManager class, 274
DesktopManager interface, 272
beginUpdate( ) (UndoableEditSupport), 675
bevel borders, 66, 407, 410-415
BevelBorderUIResource class, 1027
examples of, 414
BevelBorder class, 410-415
properties table for, 412
BevelBorderUIResource class, 1027
BevelExample.java (example), 414
bevels, 410
bevelType property (BevelBorder, SoftBevelBorder), 412
bias, 834
bidiRootElement property (AbstractDocument), 804
BigRenderer.java (example), 531
binding mechanism, 73
blinkRate property (Caret), 736
blockIncrement property (JScrollbar), 139
BoldAction class, 874
boolean property (JProgress), 148
Border interface, 65, 407, 408
border property
JComponent class, 57, 65, 407
TitledBorder class, 422
BorderFactory class, 427-429
borderOpaque property
AbstractBorder class, 409
EtchedBorder class, 416
LineBorder class, 418
MatteBorder class, 420
[Soft]BevelBorder classes, 411
TitledBorder class, 422
borderPainted property
AbstractButton class, 108
JMenuBar class, 442
JMenuItem class, 447
JPopupMenu class, 456
JProgressBar class, 149
JToolBar class, 484
borderPaintedFlat property (JCheckBox), 124
borders, 406-430
adding to components, 65
Border interface, 408
BorderUIResource class, 1026
buttons and
border margin from, 108
radio buttons, 126
removing borders from buttons, 119
changing on the fly, 413
class hierarchy of, 407
classes for, 409-429
custom, 429-431
defining, 1065-1067
defaults, defining for L&F, 1060
drawing/painting, caution with, 408, 429
examples of, 414, 421, 425, 429, 1066
javax.swing.border package for, 10
for progress bars, 148-149
style of, 406
borderSelectionColor property (DefaultTreeCellEditor), 625
BorderUIResource class, 1026
bottomComponent property (JSplitPane), 317
bound properties, xxi, 1101, 1136
actions and, 41
events and, 1137, 1145
boundAction property (Keymap), 755
bounded frames, 279
bounded ranges, 132-158
Bounded.java (example), 136-138
BoundedRangeModel interface for, 132
model for, 132-138
progress bars, 148-154
rules for working with, 133
scrollbars, 138-142
sliders, 142-148
BoundedRangeModel interface, 132-134
properties table for, 133
boundKeyStrokes property (Keymap), 755
bounds property
AccessibleComponent interface, 984
JComponent class, 57, 63
Box class, 339-342
vs. BoxLayout class, 339
boxes
alignment of, 347
creating/sizing, 339
widths/heights of, 342
Box.Filler class, 342
properties table for, 343
BoxLayout class, 343-348
vs. Box class, 339
vs. GridLayout class, 347
BoxView class, 841
braces, 816-820
brackets, 816-820
BranchElement class (AbstractDocument), 803
breadthFirstEnumeration( ) (DefaultMutableTreeNode), 601
break methods, 838
breakView( ) (View), 838
buffering (see double buffering)
buildChooser( ) (AbstractColorChooser-Panel), 395
button ribbons, 339
ButtonBorder class, 1065
ButtonGroup class, 128-131
properties table for, 129
ButtonModel interface, 101-104
properties table for, 102
buttons, 101-131
alignment for, 348
ButtonModel interface for, 101-104
class hierarchy of, 12, 101
classes for, 104-131
creating via actions, 116
Cut/Copy/Paste, 35, 39
default, 113
in dialogs, 293
event handlers for, 28-30
examples of, 113, 657, 993-995, 1038
in file chooser dialogs, 372
grouping, 128-131
icons and
adding to buttons, 26-28
displayed on buttons, 101, 106
keeping centered, 364
layered panes, buttons added to, 240
margins for, 108
properties reflecting state of, 103
replacing AWT Buttons with JButtons, 23-26
sample layout of, 355
separators between, 477
text displayed on, 101, 106, 108
for voting mechanism (example), 129
C[ Top ]
calculateAlignedPositions( ) (SizeRequirements), 353
calculateInnerArea( ) (SwingUtilities), 1078
calculateTiledPositions( ) (SizeRequirements), 353
calendarField property (SpinnerDateModel), 213
Cancel button for halting long operations, 232
cancelCellEditing( ) (CellEditor), 534
canceled property (ProgressMonitor), 153
cancelSelection( ) (JFileChooser), 376
canImport( ) (TransferHandler), 934
CannotRedoException class, 635, 677
CannotUndoException class, 635, 677
canRedo( )
AbstractUndoableEdit class, 640
CompoundEdit class, 647
UndoableEdit interface, 638
UndoManager class, 655
canUndo( )
AbstractUndoableEdit class, 640
CompoundEdit class, 647
UndoableEdit interface, 638
UndoManager class, 655
canUndoOrRedo( ) (UndoManager), 655
capacity( ) (DefaultListModel), 167
CardLayout class (AWT), 333
Caret interface, 734-737
properties table for, 736
caret property (JTextComponent), 686
caretColor property (JTextComponent), 686
CaretEvent class, 745
properties table for, 746
CaretListener interface, 745
caretPosition property (JTextComponent), 687
carets, 734-746
constants for, drag and drop functionality, 943
custom, 740
dynamic, Drag and Drop support for, 960
examples of, 741, 743
positioning and, 847
caretUpdate( ) (CaretListener), 745
cascading stylesheets (CSS), 896
case, 846
CCPHandler.java (example), 30
cell renderers, 163, 182-185, 1087
example of, 549-553
CellEditor interface, 533
methods for, 626-631
cellEditor property
JTable class, 493
JTree class, 583
TableColumn class, 499
CellEditorListener interface, 535
cellEditorValue property
DefaultCellEditor class, 535
DefaultTreeCellEditor class, 625
cellRenderer property
JTree class, 583
TableColumn class, 499
CellRendererPane class, 532, 1087
cells, 182
default cell, 185
rendering/editing, 530-538, 1087
(see also tables, data in)
cellSelectionEnabled property (JTable), 492
census form, sample code for, 321
change events, 51
bounded ranges and, 135
buttons and, 103, 114
JInternal Frame class, 264
progress bars and, 150
changedUpdate( )
DocumentListener interface, 818
View class, 840
ChangeEvent class, 51-52
changeHighlight( )
DefaultHighlighter class, 753
Hightlighter interface, 750
ChangeListener interface, 52
changeListeners property (StyleContext), 782
changeShape( ) (Filler), 343
changeToParentDirectory( ) (JFileChooser), 379
character attributes, 762, 775
characterAttributeRun property (StyledEditorKit), 870
characterAttributes property (JTextPane), 761
CharacterConstants class (StyleConstants), 779
characters, uppercase/lowercase, 846
charting data, 557-566
ChartPainter.java (example), 562
ChartTester.java (example), 558
checkboxes, 124-126
JCheckBox class, 124-126
JCheckBoxMenuItem class, 469, 473
transparency and, 127
using, 471-473
CheckBoxMenuItemExample.java (example), 471-472
child access methods, for nodes, 594
childCount property (TreeNode), 594
childIndices property (TreeModelEvent), 611
child/parent relationship of components and containers, 53
children property (TreeModelEvent class), 611
children, trees and, 570
children( ) (DefaultMutableTreeNode), 602
childrenAdded property (DocumentEvent.ElementChange), 822
childrenRemoved property (DocumentEvent.ElementChange),822
Choice component (AWT), 200
choosableFileFilters property (JFileChooser), 371
choosePanels property (JColorChooser), 391
chooser dialogs, 366-388
custom, 400-405
examples of, 381
filechooser package, 380-388
panels for, 394-400
class hierarchies, 11-13
diagrams of, xxii
classes, defining for L&F, 1057
className property (LookAndFeelInfo), 1034
clear( )
AccessibleStateSet class, 980
ActionMap class, 83
DefaultListModel class, 169
InputMap class, 81
clearAccessibleSelection( ) (AccessibleSelection), 986
clearGlobalFocusOwner( ) (KeyboardFocusManager), 1110
clearSelection( )
JList class, 190
JTable class, 498, 525
JTree class, 590
ListSelectionModel interface, 175
SingleSelectionModel interface, 438
TreeSelectionModel interface, 607
clickCount property (MenuDragMouse-Event), 451
clickCountToStart property (DefaultCellEditor), 535
client properties, 67
isPalette property, 267
JSlider.isFilled, 146
clock, 1082-1085
ClockLabel.java (example), 1084
clone( )
DefaultEditorKit class, 863
DefaultListSelectionModel class, 177
EditorKit class, 855, 908
ElementIterator class, 823
JFormattedTextField.AbstractFormatter class, 716
Segment class, 825
StyledEditor class, 871
cloneWithSource( ) (TreeSelectionEvent), 614
closable property (JInternalFrame), 263
close( )
ProgressMonitor class, 152, 154
ProgressMonitorInputStream class, 157
closed property (JInternalFrame), 263
closeFrame( )
DefaultDesktopManager class, 273
DesktopManager interface, 272
coalesce property (Timer), 1082
collapsed nodes, 571
collapsed property (JTree), 585
collapsePath( ) (JTree), 591
collapseRow( ) (JTree), 591
color accessor methods, 784
color property
DefaultHighlightPainter class, 754
JColorChooser class, 392
ColorChooserComponentFactory class, 395
ColorConstants class (StyleConstants), 779
colorModel property (JComponent), 54
ColorPicker2.java (example), 397
ColorPicker.java (example), 389
colors
for borders, 411-413
chooser dialogs for, 389-405
examples of, 389, 396-397
defaults, defining for L&F, 1058, 1060
defined by MetalTheme class, 1048-1049
foreground/background, in preview panel, 399
GrayFilter class, 1088
javax.swing.colorchooser package for, xv, 10
JColorChooser class, 389, 391-405
Metal L&F and, 1046
for parentheses/brackets/braces, 816-820
transparency (see transparency)
ColorSelectionModel class, 390-391
colorSelectionModel property (Abstract-ColorChooserPanel), 394
ColorTable.java (example), 537
column headers, 327
column property
TableColumnModel interface, 502
TableModelEvent class, 515
columnAdded( ) (TableColumnModelListener), 505
columnAtPoint( ) (JTable), 498
columnCount property
JTable class, 492
TableColumnModel interface, 501
TableModel interface, 507
columnHeader property (ScrollPaneLayout), 330
columnHeaderView property (JScrollPane), 324
columnMargin property (TableColumnModel), 501
columnMarginChanged( ) (TableColumnModelListener), 505
columnModel property
JTable class, 492
JTableHeader class, 526
columnMoved( ) (TableColumnModelListener), 505
columnRemoved( ) (TableColumnModelListener), 505
columns in tables (see tables, columns)
columns property
JTextArea class, 701
JTextField class, 693
TableColumnModel interface, 502
columnSelectionAllowed property
JTable class, 492
TableColumnModel interface, 501
columnSelectionChanged( ) (TableColumnModelListener), 505
CombinationFormatter.java (example), 719-721
combinations, formatter for editing, 718
combo boxes, 193-208
adding/removing objects, 201
displaying, 204
editing, 197-200
examples of, 207, 628
heavyweight vs. lightweight components and, 1126
items in, mapping keystrokes to, 202
JComboBox class, 200-208
list methods for, 206
selecting objects in, 203
ComboBoxEditor interface, 197-200
properties table for, 198
ComboBoxEditorExample.java (example), 198-200
ComboBoxModel interface, 194
properties table for, 195
Command key, for list selections, 162, 185
commitEdit( )
DefaultEditor class, 219
JFormattedTextField class, 714
JSpinner class, 210
commitsOnValidEdit property (DefaultFormatter), 717
compass navigation example, 328, 358, 364
CompassButtons.java (example), 358
component property
DefaultCellEditor class, 535
DragGestureEvent class, 939
DragGestureRecognizer class, 936
DropTarget class, 921
JComponent class, 54
JMenuBar class, 441
componentAtIndex property
JMenuBar class, 441
JToolBar class, 484
componentCount property (JComponent), 54
componentOrientation property
JComponent class, 188
JMenu class, 464
components
accessibility (see entries at accessible; accessibility)
actions and, 41-48
applications, adding components to, 22-30
binding to keyboard events, 73
borders, adding to, 65
bounded-range, 132-158
box, adding to, 339
building your own, 1133-1155
change events, 51
ComponentUI class, 1015, 1035-1036
ComponentView class, 841
defaults, defining for L&F, 1059-1063
double buffering, 68
empty space around, adding, 415
focus and focus cycle, 70-72, 78
"glue", 340, 342
hierarchy of, 11-13
import/export capabilities of (tables), 913
javax.swing package for, 10
JComponent class, 52-79, 1015
keyboard functionality, adding to, 757-759
layers, adding components to, 242-244
lightweight vs. heavyweight, 6-8, 17, 53, 1124-1127
overlapping, 1125
look-and-feel (see look-and-feel)
methods commonly used for, 55
models for, 13, 1134-1141
painting and repainting, 59-63, 1072-1074, 1128-1133
examples of, 562-563
replacing AWT with Swing, 20-30
resizing, 1143
serializing, 69
size, position, alignment of, 63-65
spaces between, 341
UI delegate classes, creating for, 1068-1074
views (see views)
components property (JComponent), 54
componentsSwing Set demonstration of, 17
ComponentUI class, 1015, 1035-1036
ComponentView class, 841
CompositeView class, 841
compound borders, 65, 407
BorderFactory class, 427-429
CompoundBorder class, 426-427
CompoundBorderUIResource class, 1027
CompoundBorder class, 65, 426-427
properties table for, 426
CompoundBorderUIResource class, 1027
CompoundEdit class, 634, 644-650
nested edit support and, 675
properties table for, 645
computeDifference( ) (SwingUtilities), 1078
computeIntersection( ) (SwingUtilities), 1078
computeStringWidth( ) (SwingUtilities), 1078
computeUnion( ) (SwingUtilities), 1078
computeVisibleRect( ) (JComponent), 78
configureEditor( ) (JComboBox), 205
confirm dialogs, 296
example of, 302
return values for, 304
constrained properties, 278, 1136
JInternalFrame class, 263
constraint methods, 357
constraint property (SpringLayout.Constraints), 360
constructors for UI delegates, 1069
container property (View), 835
containers, 225-258
actions and, 41
focus cycle and, 71
frames (see frames)
layers/panes (see panes)
non-JComponent, 1192
panels (see panels)
root container, 71
root pane, 228-246
validating/revalidating, 237
contains( )
AccessibleComponent interface, 985
AccessibleStateSet class, 980
ComponentUI class, 1035
DefaultListModel class, 167
JComponent class, 77
containsAttribute( )
AttributeSet interface, 769
SimpleAttributeSet class, 773
containsAttributes( )
AttributeSet interface, 769
SimpleAttributeSet class, 774
Content class (AbstractDocument), 803
Content interface, 825
content pane, 229
content property (DropTargetContext), 924
content, restricting length of, 809
content style methods, 815
content type mappings, 851, 853
contentAreaFilled property (AbstractButton), 109
checkboxes/radio buttons and, 127
contentPane property
JApplet class, 257
JFrame class, 247
JInternalFrame class, 263
JRootPane class, 236
JWindow class, 252
contentsChanged( )
JComboBox class, 207
ListDataEvent class, 173
contentType property
DefaultEditorKit class, 858
EditorKit class, 855
HTMLEditorKit class, 890
JEditorPane class, 851
continuousLayout property (JSplitPane), 317
Control key, for list selections, 162, 185
controllers, 13
conventions used in this book, xx-xxii, 18
convertMouseEvent( ) (SwingUtilities), 1078
convertPoint( ) (SwingUtilities), 1078
convertPointFromScreen( ) (SwingUtilities), 1079
convertPointToScreen( ) (SwingUtilities), 1079
convertRectangle( ) (SwingUtilities), 1079
copy( )
JPasswordField class, 700
JTextComponent class, 688
CopyAction class, 37, 864
copyAction property (TransferHandler), 933
copyAttributes( ) (AttributeSet), 769, 774
copyInto( ) (DefaultListModel), 167
corner components on scrollpanes, 320, 325
corner property (ScrollPaneLayout), 330
CornerCaret.java (example), 741
corners, 328
create( )
HTMLEditorKit class, 891
ViewFactory interface, 833, 910
createBevelBorder( ) (BorderFactory), 427
createBlackLineBorder( ) (LineBorder), 419
createCaret( )
DefaultEditorKit class, 863
EditorKit class, 855
createChangeListener( )
JProgressBar class, 150, 210
JSlider class, 146
JTabbedPane class, 336
createCompoundBorder( ) (BorderFactory), 428
createCompoundEdit( ) (UndoableEditSupport), 675
createDefaultDocument( )
DefaultEditorKit class, 863
EditorKit class, 855
StyledEditor class, 871
createDefaultDragGestureRecognizer( ) (DragSource), 944
createDefaultKeySelectionManager( ) (JComboBox), 206
createDialog( )
JColorChooser class, 393
JFileChooser class, 380
JOptionPane class, 309
createDisabledImage( ) (GrayFilter), 1088
createDragGestureRecognizer( ) (DragSource), 944
createDragSourceContext( ) (DragSource), 944
createEditorKitForContentType( ) (JEditorPane), 853
createEmptyBorder( ) (BorderFactory), 427
createEtchedBorder( ) (BorderFactory), 428
createFragment( ) (View), 838
createGlue( ) (Box), 340
createGrayLineBorder( ) (LineBorder), 419
createHorizontalBox( ) (Box), 340
createHorizontalGlue( ) (Box), 340
createHorizontalScrollBar( ) (JScrollPane), 324
createHorizontalStrut( ) (Box), 341
createInternalFrame( ) (JOptionPane), 310
createLineBorder( ) (BorderFactory), 428
createLoweredBevelBorder( ) (BorderFactory), 428
createMatteBorder( ) (BorderFactory), 428
createNewFolder( ) (FileSystemView), 388
createPosition( )
AbstractDocument class, 808
Content interface, 826
Document interface, 802
GapContent class, 827
createRaisedBevelBorder( ) (BorderFactory), 428
createRigidArea( ) (Box), 341
createStandardLabels( ) (JSlider), 144, 147
createTitledBorder( ) (BorderFactory), 428
createToolTip( ) (JComponent), 67, 79
createTransferable( ) (TransferHandler), 934
createUI( )
ComponentUI class, 1036
for UI delegates, 1069
createValue( )
ActiveValue interface, 1023
LazyValue interface, 1023
createVerticalBox( ) (Box), 340
createVerticalGlue( ) (Box), 340
createVerticalScrollBar( ) (JScrollPane), 324
createVerticalStrut( ) (Box), 341
createViewport( ) (JScrollPane), 325
cross-platform L&F, 1028
CSS (cascading stylesheets), 896
current( )
ElementIterator class, 822
Segment class, 825
currentDataFlavors property
DropTargetContext class, 924
DropTargetDragEvent class, 926
DropTargetDropEvent class, 928
currentDataFlavorsAsList property
DropTargetContext class, 924
DropTargetDragEvent class, 926
DropTargetDropEvent class, 928
currentDirectory property (JFileChooser), 371
currentFocusCycleRoot property (KeyboardFocusManager), 1111
currentManager( ) (RepaintManager), 1131
cursor property
AccessibleComponent interface, 984
DragSourceContext class, 946
JComponent class, 54
cursors (see carets)
CurvedBorder.java (example), 429
cut( )
AccessibleText interface, 991
JPasswordField class, 700
JTextComponent class, 688
CutAction class, 864
cutAction property (TransferHandler), 933
D[ Top ]
damage( ) (DefaultCaret), 740
data in tables (see tables)
data input area, in dialogs, 293
data lists, 985
data transfer, example of, 931
data types, property tables and, xx
database records in tables, 521-525
advanced examples of, 539-566
DatabaseTest.java (example), 521
date and time, formatting, 725
date property (SpinnerDateModel), 213
date spinners, 213-220
DateEditor class (JSpinner), 219
properties table for, 220
DateFormatter class, 725
deactivateFrame( )
DefaultDesktopManager class, 274
DesktopManager interface, 272
DebugGraphics class, 69
debugGraphicsOption property (JComponent), 57
DebugHTMLEditorKit.java (example), 891
decrIndent( ) (AbstractWriter), 903
default values, property tables and, xx
defaultAction property (Keymap), 755
DefaultBoundedRangeModel class, 135-138
defaultButton property
JButton class, 112
JRootPane class, 236
DefaultButtonExample.java (example), 113
DefaultButtonModel class, 104
defaultCapable property (JButton), 113
DefaultCaret class, 737-745
CornerCaret.java (example), 741
DefaultCellEditor class, 535, 616
properties table for, 536
defaultCloseOperation property
JDialog class, 288
JFrame class, 248
JInternalFrame class, 263
DefaultColorSelectionModel class, 391
DefaultComboBoxModel class, 196
defaultCursor property (HTMLEditorKit), 890
DefaultDesktopManager class, 273-275
DefaultDocumentEvent class (AbstractDocument), 803
defaultDragSource property (DragSource), 942
DefaultEditor class (JSpinner), 218
properties table for, 219
DefaultEditorKit class, 858-863
CopyAction class, 37
properties table for, 858
defaultFocusTraversalKeys property (KeyboardFocusManager), 1111
defaultFocusTraversalPolicy property (KeyboardFocusManager), 1111
DefaultFormatter class, 716-721
properties table for, 717
DefaultFormatterFactory class, 727-730
DefaultHighlighter class, 752
DefaultHighlightPainter class, 753
properties table for, 754
DefaultKeyboardFocusManager class, 1112
DefaultKeyTypedAction class, 863
DefaultListCellRenderer class, 185
DefaultListModel class, 162, 166-171
properties table for, 166
DefaultListSelectionModel class, 162, 176-179
properties table for, 176
defaultLookAndFeelDecorated property
JDialog class, 288
DefaultMetalTheme class, 1049
DefaultMutableTreeNode class, 568, 595-602
properties table for, 596
DefaultPainter highlighter, 752
defaultRootElement property
AbstractDocument class, 804
DefaultStyledDocument class, 813
Document interface, 800
defaults property (LookAndFeel), 1016
DefaultSingleSelectionModel class, 438
DefaultStyledDocument class, 812-818
properties table for, 814
DefaultTableCellRenderer class, 531-533
DefaultTableColumnModel class, 503, 542
DefaultTableModel class, 512-515
DefaultTreeCellEditor class, 624-631
properties table for, 625
DefaultTreeCellRenderer class, 619-620
properties table for, 619
DefaultTreeModel class, 574-577
ObjectTree.java (example), 588
DefaultTreeSelectionModel class, 607-609
properties table for, 607
deiconifyFrame( )
DefaultDesktopManager class, 273
DesktopManager interface, 272
deinstall( )
Caret interface, 737
DefaultCaret class, 738
DefaultHighlighter class, 753
EditorKit class, 908
Hightlighter interface, 750
HTMLEditorKit class, 890
StyledEditor class, 871
delay property
JMenu class, 463
Timer class, 1082
delegation methods, 812, 816
depth( ) (ElementIterator), 823
depthFirstEnumeration( ) (DefaultMutableTreeNode), 602
descendant/ancestor components, 53
descendants, trees and, 571
description property
HyperlinkEvent class, 886
ImageIcon class, 98
LookAndFeel class, 1017
descriptions for files/folders, FileView class for, 383
deserializing objects, 69
desktop environment simulation, 259-285
building the desktop, 275-285
sample code for, 281-285
classes for, 260-275
DialogDesktop.java (example), 311
internal frame dialogs, using with JDesktopPane class, 311-313
desktopIcon property (JInternalFrame), 263
DesktopManager interface, 271
sample desktop and, 275
desktopManager property (JDesktopPane), 270
desktopPane property (JInternalFrame), 263
dialog methods, 380
DialogDesktop.java (example), 311
dialogs, 286-313
color chooser dialogs, 389-391, 400-405
AbstractColorChooserPanel class, 394-395
ColorChooserComponentFactory class, 395
ColorSelectionModel class, 390-391
DefaultColorSelectionModel class, 391
examples of, 389, 396-397
custom, 400-405
examples of, 301-303
file chooser dialogs, 366-388
accessories for, 372-376
appearance of, 371
examples of, 367-370, 373-375, 381, 385, 387
filechooser package, 380-388
FileFilter class, 380-383
JFileChooser class, 367-380
font chooser dialogs, 401-405
internal frame dialogs, 311-313
internal frame, example of, 303
JDialog class, 286-289
JOptionPane class, 289-313
parameters for, 297-301
modal/non-modal, 286, 294
return values for, 303-305
static methods for, 297
structure of, 292
dialogTitle property (JFileChooser), 372
dialogType property (JFileChooser), 371
die( )
AbstractUndoableEdit class, 640
CompoundEdit class, 647
UndoableEdit interface, 636-638
directories/subdirectories, 567
directory methods, 379
directorySelectionEnabled property (JFileChooser), 371
dirty regions, 60
disabledIcon property
AbstractButton class, 107
JLabel class, 85
disabledSelectedIcon property (AbstractButton), 107
disabledTextColor property (JTextComponent), 686
discardAllEdits( ) (UndoManager), 655
dismiss( ) (DefaultEditor), 219
dismissDelay property (ToolTipManager), 1085
displayedMnemonic property (JLabel), 86
displayedMnemonicAt property (JTabbedPane), 335
displayedMnemonicIndex property
AbstractColorChooserPanel class, 394
JLabel class, 86
JMenuItem class, 445
displayName property (AbstractColorChooserPanel), 394
dispose( ) (JInternalFrame), 266
dividers for panes, 317
DnDConstants class, 923
doAccessibleAction( )
AccessibleAction interface, 983
AccessibleHyperlink class, 989
doClick( ) (AbstractButton), 111
document events, 818-831
Document interface, 800-802
properties table for, 801
Document model, 797-818
class hierarchy of, 797
document parsers, 907
document property
DocumentEvent interface, 820
Element interface, 798
JFormattedTextField class, 711
JTextComponent class, 684
JTextField class, 691
JTextPane class, 760
View class, 835
DocumentEvent interface, 820
DocumentFilter class, 845-847
documentFilter property (AbstractDocument), 804
DocumentListener interface, 818-820
documentListeners property (AbstractDocument), 804
documentProperties property (AbstractDocument), 803
documents
AttributeSet interface, 767-769
BadLocationException class, 830
Content interface, 825
DefaultStyledDocument class, 812-818
Document model for, 797-818
ElementIterator class, 822
events and, 818-831
GapContent class, 827
HTML, 897-907
locking, 806
MutableAttributeSet interface, 769
Position interface, 831
Position.Bias class, 831
restricting length of content, 809
Segment class, 823-825
SimpleAttributeSet class, 771-774
StringContent class, 826
styled
saving, 877-880
writing as HTML, 904-906
XML, tree displaying, 579-582
document/view design, 11
doDefaultCloseAction( ) (JInternal Frame), 266
dot property
Caret interface, 736
CaretEvent class, 745
double buffering, 68
viewports and, 331
doubleBuffered property
JComponent class, 57, 68
JPanel class, 226
JRootPane class, 236
downFocusCycle( ) (KeyboardFocusManager), 1110
Drag and Drop (DnD), 912-966
classes/interfaces for, 919-952
examples of, 929, 940, 950-960
programming with, 918
rearranging trees and, 952-960
Drag and Drop API, 2
Drag API, 941-952
Drag Gesture API, 934-941
drag gestures, 934
drag initiation methods, 939
drag methods, 927
dragAction property (DragGestureEvent), 939
dragDropEnd( )
DragSourceContext class, 947
DragSourceListener interface, 948
dragEnabled property, 913
JColorChooser class, 392
JList class, 188
JTextComponent class, 686
dragEnter( )
DragSourceContext class, 947
DragSourceListener interface, 947
DropTarget class, 922
DropTargetListener interface, 925
dragExit( )
DragSourceContext class, 947
DragSourceListener interface, 948
DropTarget class, 922
DropTargetListener interface, 925
dragFrame( )
DefaultDesktopManager class, 273
DesktopManager interface, 272
draggedColumn property (JTableHeader), 526
DragGestureEvent class, 939
DragGestureListener interface, 938
DragGestureRecognizer class, 935-937
properties table for, 935
dragImageSupported property (DragSource), 943
dragMouseMoved( ), DragSourceMotionListener interface, 948
dragOrigin property (DragGestureEvent), 939
dragOver( )
DragSourceContext class, 947
DragSourceListener interface, 947
DropTarget class, 922
DropTargetListener interface, 925
DragSource class, 919, 941-945
properties table for, 942
dragSource property
DragGestureEvent class, 939
DragGestureRecognizer class, 936
DragSourceAdapter class, 948
DragSourceContext class, 945-947
properties table for, 945
dragSourceContext property (DragSourceAdapter), 948
DragSourceDragEvent class, 949
DragSourceDropEvent class, 949
properties table for, 950
DragSourceListener interface, 947
dragSourceListeners property (DragSource), 942
DragSourceMotionListener interface, 948
dragSourceMotionListeners property (DragSource), 942
DragTest.java (example), 950-952
drawBezel( ) (BasicGraphicsUtils), 1067
drawDashedRect( ) (BasicGraphicsUtils), 1067
drawEtchedRect( ) (BasicGraphicsUtils), 1067
drawGroove( ) (BasicGraphicsUtils), 1067
drawLoweredBezel( ) (BasicGraphicsUtils), 1067
drawsLayeredHighlights property (DefaultHighlighter), 752
drawString( ) (BasicGraphicsUtils), 1067
drawTabbedText( ) (Text Utilities), 844
Drop API, 919-934
drop methods, 928
drop( )
DropTarget class, 922
DropTargetListener interface, 925
dropAction property
DragSourceDragEvent class, 949
DragSourceDropEvent class, 950
DropTargetDragEvent class, 926
DropTargetDropEvent class, 928
dropActionChanged( )
DragSourceContext class, 947
DragSourceListener interface, 947
DropTarget class, 922
DropTargetListener interface, 925
dropComplete( ) (DropTargetDropEvent), 928
dropSuccess property (DragSourceDropEvent), 950
DropTarget class, 919-923
properties table for, 921
dropTarget property (DropTargetContext), 924
DropTargetAdapter class, 925
DropTargetAutoScroller class, 965
DropTargetContext class, 923
properties table for, 924
dropTargetContext property
DropTarget class, 921
DropTargetEvent class, 926
DropTargetDragEvent class, 926
DropTargetDropEvent class, 927
DropTargetEvent class, 925
DropTargetListener interface, 924
DropTest.java (example), 929
dynamic cursors, Drag and Drop support for, 960
dynamic icons, 96
dynamic table data, 516-521
MarketDataModel.java (example), 518
E[ Top ]
"Easter eggs", 18
eched borders, 66
echoChar property (JPasswordField), 699
echoCharIsSet( ) (JPasswordField), 700
edges (see borders)
edit property (UndoableEditEvent), 650
editable property
JComboBox class, 200, 202
JTextComponent class, 686-687
JTree class, 583
editable state, 200
EditableComboBox.java (example), 207
editCellAt( ) (JTable), 498
editing
DocumentFilter class, 845-847
edit-merging methods for, 637
HTML, 897-900
killed edits and, 677
nested edits and, 675
table data, 530-538, 549-556
toggle edit functionality, 640-644
trees, 616-631
(see also editor kits)
editing methods, 210
for tree cells, 592
editingCanceled( ) (CellEditorListener interface), 535
editingStopped( ) (CellEditorListener interface), 535
editor kit methods, 853, 890
editor kits, 849-880
building custom, 907-911
strategies for reading/writing documents and, 910
DefaultEditorKit class, 858-863
CopyAction class, 37
EditorKit class, 854-856, 908
extending, 891-893
IOStyledEditor.java (example), 878-880
JEditorPane class, 849-854
registering with JEditorPane class, 911
SimpleEditor.java (example), 864-869
StyledEditor.java (example), 875-877
StyledEditorKit class, 869-871
TextAction class, 857
editor panes, 849, 882, 899
(see also editor kits)
editorComponent property (ComboBoxEditor), 197
EditorKit class, 854-856, 908
properties table for, 855
editorKit property
JEditorPane class, 851
JTextPane class, 761
editToBeRedone( ) (UndoManager), 656
editToBeUndone( ) (UndoManager), 656
editValid property (JFormattedTextField), 712
EEL (Every Event Listener), 48, 609
Element interface, 798-800
properties table for, 799
element lookup method, 800
element property
DefaultComboBoxModel class, 196
DocumentEvent.ElementChange interface, 822
Element interface, 800
View class, 835
elementAt property
DefaultListModel class, 166
ListModel interface, 164
elementAt( ) (DefaultListModel), 168
ElementChange interface, 821
properties table for, 822
elementCount property (Element), 800
ElementEdit class (AbstractDocument), 803
ElementIterator class, 822
elements
Element interface, 798-800
ElementChange interface, 821
ElementIterator class, 822
elements property (ButtonGroup), 128, 131
elements( ) (DefaultListModel), 167
EmailEditor.java (example), 629
EmailTreeCellEditor.java (example), 626
empty property
DefaultListModel class, 166
SimpleAttributeSet class, 772
EmptyBorder class, 415
EmptyBorderUIResource class, 1027
emptySet property (StyleContext), 782
enabled property
AbstractAction class, 45
AccessibleComponent interface, 984
Action interface, 43
ButtonModel interface, 103
JComboBox class, 203
JComponent class, 54
JMenuItem class, 448, 462
JScrollBar class, 139
ToolTipManager class, 1085
EnabledAt property (JTabbedPane), 345
end property (SpinnerDateModel), 213
end( )
CompoundEdit class, 647
StateEdit class, 669
endDraggingFrame( )
DefaultDesktopManager class, 274
DesktopManager interface, 272
endIndex property
AccessibleHyperlink class, 989
Segment class, 823
endOffset property
Element interface, 800
Highlight interface, 749
View class, 835
endPosition property, Document interface, 801
endResizingFrame( )
DefaultDesktopManager class, 274
DesktopManager interface, 272
endUpdate( ) (UndoableEditSupport), 675
ensureCapacity( ) (DefaultListModel), 167
ensureFileIsVisible( ) (JFileChooser), 379
ensureIndexIsVisible( ) (JList), 189
enterprise development, 1
enumeration methods, 601
etched borders, 407
EtchedBorder class, 66, 416-418
properties table for, 417
EtchedBorderUIResource class, 1027
etchType property (EtchedBorder), 416
event handling
for buttons, 28-30
menu items and, 447
for scrollbars, 141
event list methods, 939
event listeners (see listeners)
event methods, 75, 946
Drag and Drop, 919
EventListenerList class, 1089-1092, 1138
EventQueueMonitor class, 996-999
events, 48
AbstractAction class, 45
AbstractButton class, 109
AccessibleComponent interface, 984
AccessibleContext class, 976
Action interface, 44
AWTEventMonitor class, 999
bound properties and, 1137, 1145
BoundedRangeModel interface, 134
ButtonModel interface, 103
Caret interface, 737
CaretEvent class, 745
CellEditor interface, 533
change events, 51
ColorSelectionModel interface, 390
ComboBoxEditor interface, 198
controllers and, 13
DefaultButtonModel class, 105
DefaultCellEditor class, 536
DefaultColorChooserModel class, 391
DefaultListSelectionModel interface, 177
DefaultSingleSelectionModel class, 439
DefaultStyledDocument class, 814
documents, 818-831
Document interface, 801
DocumentEvent interface, 820
ElementChange interface, 821
EventType interface, 821
drag and drop functionality and, 918
DragGestureRecognizer class, 936
DragSource class, 943
DragSourceAdapter class, 948
DragSourceContext class, 946
DropTarget class, 921
event dispatch thread, 1118-1123
EventQueueMonitor class, 996-999
HyperlinkEvent class, 852, 885, 886
internal frames and, 268-269
javax.swing.event package for, xv, 10
JButton class, 114
JColorChooser class, 392
JComboBox class, 204
JComponent class, 75
JEditorPane class, 852, 885
JFileChooser class, 376
JFormattedTextField class, 713
JInternalFrame class, 264
JList class, 191
JOptionPane class, 294
JProgressBar class, 150, 210
JScrollBar class, 140
JSlider class, 146
JTabbedPane class, 336
JTextArea class, 702
JTextComponent class, 687
JTextField class, 693
JToggleButton class, 121
JViewport class, 332
keyboard (see keyboard events; keystrokes)
lists
EventListenerList class, 1089-1092, 1138
ListDataEvent class, 171, 195, 197
ListSelectionEvent class, 179-182, 191
menus
JMenu class, 466
JMenuItem class, 447, 449
JPopupMenu class, 456
MenuEvent class, 468
MenuKeyEvent class, 452
MenuKeyListener interface, 453
PopupMenuEvent class, 460
mouse-related (see mouse events)
SingleSelectionModel interface, 438
SpinnerModel interface, 213
SwingEventMonitor class, 1000-1002
SwingPropertyChangeSupport class, 1101
tables
AbstractTableModel class, 511
DefaultTableColumnModel class, 504
DefaultTableModel class, 513
JTable class, 496
TableColumn class, 500
TableColumnModel interface, 502
TableColumnModelEvent class, 504
TableModel interface class, 508
TableModelEvent class, 515
text styles
Style interface, 771
StyleContext class, 782
Timer class, 1083
trees, 609-615
DefaultTreeCellEditor class, 625
JTree class, 586
TreeModel interface, 573
TreeModelEvent class, 573, 611
TreeSelectionModel interface, 606-607
trigger, popup menus and, 453
UIDefaults class, 1020
UIManager class, 1031
UndoableEditEvent class, 634, 650
EventType interface, 821
eventType property (HyperlinkEvent), 886
Every Event Listener (EEL), 48, 609
examples (see sample code)
exceptions, BadLocationException class and, 830
ExitClose1.java (example), 250
expanded nodes, 571
expanded property (JTree), 585
expandPath( ) (JTree), 591
expandRow( ) (JTree), 591
expandsSelectedPaths property, 585
ExpandVetoException class, 615
expansion events, 609, 614
expansion methods, 590
exportAsDrag( ) (TransferHandler), 934
exportDone( ) (TransferHandler), 934
exportToClipboard( ) (TransferHandler), 934
expression tree model (example), 622, 628
ExpressionTreeCellRenderer.java (example), 622
ExtendedUndoManager.java (example), 678
extent property
BoundedRangeModel class, 133
JSlider class, 145
extents of bounded ranges, 132-134
F[ Top ]
factory method for UI delegates, 1069
FactoryDemo.java (example), 729
FancyButton.java (example), 119
FancyCaret class, 743
FancyCaret.java (example), 743
FieldBorder class, 1065
fields for component size, 353
FieldView class, 841
file chooser dialogs
accessories for, 372-376
examples of, 367-370, 373-375
filters, 381
thumbnails for file icons, 385
viewer, 387
JFileChooser class, 367-380
file filter methods, 378
file methods, 379
filechooser package, 10, 380-388
FileDialog class (AWT), 366
FileFilter class, 380-383
fileFilter property (JFileChooser), 371
fileHidingEnabled property (JFileChooser), 371
FileModel.java (example), 509
files
chooser dialogs for, 366-388
classes for displaying/filtering, 380-388
dropping into a tree (example), 953
loading, monitoring progress of, 157
fileSelectionEnabled property (JFileChooser), 371
fileSelectionMode property (JFileChooser), 371
FileSystemView class, 388
fileSystemView property (JFileChooser), 371
FileTable.java (example), 510
FileView class, 383-387
fileView property (JFileChooser), 371
Filler class (see Box.Filler class)
filter bypass methods, 848
filterRGB( ) (GrayFIlter), 1089
filters
creating for JFileChooser dialogs, 380
for file selection, 371
findColumn( ) (AbstractTableModel), 512
findFocusOwner( ) (SwingUtilities), 1079
fireActionPerformed( )
JFileChooser class, 376
JTextField class, 694
Timer class, 1083
fireAdjustmentValueChanged( ) (JScrollBar), 141
fireCaretUpdate( ) (JTextComponent), 687
fireChangedUpdate( ) (AbstractDocument), 805
fireColumn . . . ( ) (DefaultTableColumnModel), 504
fireDragGestureRecognized( ) (DragGestureRecognizer), 936
fireHyperlinkUpdate( ) (JEditorPane), 852
fireInsertUpdate( ) (AbstractDocument), 805
fireIntervalAdded( ) (AbstractListModel), 165
fireIntervalRemoved( ) (AbstractListModel), 165
firePopupMenuWillBecomeVisible( ) (JComboBox), 207
firePropertyChange( )
AccessibleContext class, 977
SwingPropertyChangeSupport class, 1101
UIDefaults class, 1020
firePropertyChange( ) (AccessibleContext), 976
fireRemoveUpdate( ) (AbstractDocument), 805
fireStateChanged( )
JProgressBar class, 150, 210
JSlider class, 146
JTabbedPane class, 336
JViewport class, 332
fireTable . . . ( ) (AbstractTableModel), 512
fireTreeCollapsed( ) (JTree)( ), 586
fireTreeExpanded( ) (JTree), 586
fireTreeNodes . . . ( ) (DefaultTreeModel), 575
fireTreeStructureChanged( ) (DefaultTreeModel), 575
fireTreeWillExpand( ) (JTree), 586
fireUndoableEditUpdate( ) (AbstractDocument), 805
fireValueChanged( ) (JTree), 587
fireWillCollapse( ) (JTree), 586
first( )
ElementIterator class, 822
Segment class, 825
firstElement( ) (DefaultListModel), 168
firstRow property (TableModelEvent), 515
firstVisibleIndex property (JList), 187
fixedCellHeight property (JList), 188
fixedCellWidth property (JList), 188
FixedHeightLayoutCache class, 631
fixedRowHeight property (JTree), 585
flavorMap property
DragSource class, 943
DropTarget) class, 921
float coordinates, 833
floatable property (JToolBar), 484
floating toolbars, 483, 488
FlowView class, 841
focus, 70-72, 1102-1116, 1145
creating your own traversal policy for, 1113-1116
examples of, 1106, 1113-1116
JComponent methods for, 78
focus cycle, 71, 1145
focus methods, 71, 78
focus painting, removing from buttons, 119
focusable property (JComponent), 72
focusAccelerator property (JTextComponent), 687
focusCycleRoot property
JComponent class, 57
JInternalFrame class, 263
focusCycleRootAncestor property (JInternalFrame), 263
focusedWindow property (KeyboardFocusManager), 1111
FocusExample.java (example), 1106
focusGained( ) (DefaultCaret), 739
focusLost( ) (DefaultCaret), 739
focusLostBehavior property (JFormattedTextField), 713
FocusManagerExample class, 1115
focusNextComponent( ) (KeyboardFocusManager), 1110
focusOwner property (KeyboardFocusManager), 1110
focusPainted property
AbstractButton class, 109
JMenuItem class, 448
focusPreviousComponent( ) (KeyboardFocusManager), 1110
focusTraversable property
AccessibleComponent interface, 984
JComponent class, 57
FocusTraversalExample.java (example), 1115
FocusTraversalPolicy class, 71, 1112
focusTraversalPolicy property (JEditorPane), 852
font accessor methods, 784
font property
AccessibleComponent interface, 984
DefaultTreeCellEditor class, 625
JComponent class, 54
JLabel class, 85
JTextArea class, 701
JTextField class, 693
FontCharacterConstants class (StyleConstants), 779
FontChooser.java (example), 401-405
FontFamilyAction class, 873
FontPicker.java (example), 405
fonts
actions for, 869
chooser dialogs for (examples), 401-405
classes for, 873
defaults, defining for L&F, 1060
font properties declared in MetalTheme class, 1049
FontSizeAction class, 873
foreground property
AccessibleComponent interface, 983
DefaultTableCellRenderer class, 531
JComponent class, 54, 399
JInternalFrame class, 262
ForegroundAction class, 873
format property (InternationalFormatter), 725
formatted text fields, 708-733
examples of, 719-721
formatter property (JFormattedTextField), 712
formatterFactory property (JFormattedTextField), 712
formatters, for editing combinations, 718
forms, example of, 695
FractionSpring.java (example), 364
FrameClose1.java (example), 249
frameIcon property (JInternalFrame), 263
frameInit( ) (JFrame), 249
frames
closing, vs. exiting program, 249-251
internal (see internal frames)
JFrame class, 246-251
PagingTester.java (example), 548
laying out on desktop/resizing, 279
FSTest.java (example), 954
FSTree.java (example), 953
G[ Top ]
GapContent class, 827
gestureModifiers property (DragSourceDragEvent), 949
GestureTest.java (example), 940
get methods, 19, 1136
property tables and, xx
glass pane, 229, 231-235
visibility, JInternalFrame class and, 266
GlassExample.java (example), 233-235
glassPane property
JApplet class, 257
JFrame class, 247
JInternalFrame class, 263
JRootPane class, 236
JWindow class, 252
glue components, 340, 342
GlyphView class, 841
Gosling, James, 4
grabFocus( ) (JComponent), 78
graphical user interfaces (GUIs), events and, 48
Graphics class, 69
graphics methods, 77
graphics property
JComponent class, 57
View class, 835
graphics (see images)
GraphicsConfiguration class, 49
GraphicsDevice class, 49
GraphicsEnvironment class, 49
GrayFilter class, 1088
GrayScalePanel.java (example), 396-397
GridBagLayout class, replacement for, 355
gridColor property (JTable), 493
GridLayout class vs.BoxLayout class, 347
group property (ButtonModel), 103
guiInitialized( ) (GUIInitializedListener), 1002
GUIInitializedListener interface, 1002
GUIs (graphical user interfaces), events and, 48
GuiScreens.java (example), 49
H[ Top ]
half( ), 365
hasFocus( ) (JComponent), 78
hasListeners( ) (SwingProperty-ChangeSupport), 1101
HBox.java (example), 346
HBoxWithGlue.java (example), 340
HBoxWithStrut.java (example), 342
headerRenderer property (TableColumn), 499
headers, 327
for scrollpanes, 320, 325
for table columns, 525
for table rows, 540-543
headerValue property (TableColumn), 499
heavyweight components, 7, 17, 1124-1127
overlapping with lightweight, 1125
popup menu as, 456
height property (JComponent), 57
helpMenu property (JMenuBar class), 442
hidePopup( ) (JComboBox), 205
hierarchy relationships, trees for, 567
highestLayer( ) (JLayeredPane), 245
highlight color for borders, 411
Highlight interface, 749
highlightColor property (EtchedBorder), 416
Highlighter interface, 734, 749-751
properties table for, 749
highlighter property (JTextComponent), 686
highlighters, 734, 746-754
adding multiple highlights and, 750
example of, 747
highlightInner property (BevelBorder, SoftBevelBorder), 413
highlightOuter property (BevelBorder, SoftBevelBorder), 413
HighlightPainter interface, 746, 749
highlights property
DefaultHighlighter class, 752
Highlighter interface, 749
horizontal scrollbars, 328
horizontalAlignment property
AbstractButton class, 108
JLabel class, 86
JMenuItem class, 448
JTextField class, 693
horizontalScrollBarPolicy property (JScrollPane), 323
horizontalTextPosition property
JLabel class, 87
JMenuItem class, 448
horizontalVisiblity property (JTextField), 693
hotspots, 483
HTML, 690, 880-907
AccessibleHyperlink class, 988
AccessibleHypertext interface, 975, 988
<applet> tag and, 255
document methods for, 891
HyperlinkEvent class, 852, 885-886
HyperlinkListener interface, 885
labels and, 93
page manager (example), 34-40
sample browser for, 849-851, 881-883
Swing packages for, 11
HTML class, 895
HTML documents
editing, 897-900
parsers for, 907
reading/writing, 900-906
HtmlConverter application, 255
HTMLDocument class, 893-895
properties table for, 893
HTMLEditorKit class, 887-891, 897
inner classes of, 888
properties table for, 889
HTMLExample.java (example), 849-851
HTMLFrameHyperlinkEvent class, 887
HTMLWriter class, 903
hyperlink events, 884-887
HyperlinkEvent class, 852, 885-886
HyperlinkListener interface, 885
hyperlinks, 850-852, 881-893
AccessibleHyperlink class, 988
AccessibleHypertext interface, 975, 988
actions for, 898
HyperlinkEvent class, 852
hyperlinkUpdate( ) (HyperlinkListener), 885
I[ Top ]
icon factory, defining, 1063-1065
Icon interface, 26-28, 94-97
properties table for, 94
icon parameter (JOptionPane), 300
icon property
AbstractButton class, 107
JInternalFrame class, 263
JLabel class, 85
IconAndTipRenderer.java (example), 622
IconEditor.java (example), 223
iconifiable property (JInternalFrame), 263
iconifyFrame( )
DefaultDesktopManager class, 273
DesktopManager interface, 272
IconPolice.java (example), 278
icons, 94-100
adding to buttons, 119
for checkboxes, 124
custom, example of in message dialog, 302
defaults, defining for L&F, 1061
on desktop, managing, 274
in dialogs, 293, 300
displayed on buttons, 101, 106
dynamic, 96
for files/folders, FileView class for, 383
inside frame titlebar, 263
IconPolice.java (example), 278
IconView class, 841
JDesktopIcon class, 267
matte borders and, caution with, 420
menu items and, 445
for radio buttons, 126
spinner editor for displaying, 222
for trees, 616-618, 620
(see also images)
iconTextGap property (JLabel), 87
IconView class, 841
ID property (LookAndFeel), 1017
id property (MenuDragMouseEvent), 451
identifier property (TableColumn), 500
image buttons (see icons)
image magnifier pane, 330
image methods, 1088
image property (ImageIcon), 99
ImageAction class, 899
imageHeight property (ImageIcon), 99
ImageIcon class, 98-100
properties table for, 99
ImageLabelExample.java (example), 90
imageLoadStatus property (ImageIcon), 99
imageObserver property (ImageIcon), 99
images
background, 276
on buttons, adding, 26-28
debugging, 69
Graphics class, 69
GrayFilter class, 1088
image viewer for, 372
inserting into HTML documents, 899
within labels, 90-92
labels for, 84-94
magnifier pane for displaying, 330
Renderer interface, 1088
spinner editor for displaying, 222
(see also icons)
imageWidth property (ImageIcon), 99
importData( ) (TransferHandler), 934
incrIndent( ) (AbstractWriter), 903
indent( ) (AbstractWriter), 902
index property
DocumentEvent.ElementChange interface, 822
Segment class, 823
index0/index1 properties (ListDataEvent), 171
indexAtLocation( ) (JTabbed Pane), 337
indexed properties, xxi, 1136
indexOf( ) (DefaultListModel), 167
indexOfComponent( ) (JTabbedPane), 338
indexOfTab( ) (JTabbedPane), 338
indexToLocation( ) (JList), 190
inherited properties, 53-55
init( )
JApplet class, 254-257
StateEdit class, 669
initComponentDefaults( ), 1157
initialDelay property
Timer class, 1082
ToolTipManager class, 1085
initialize( ) (LookAndFeel), 1018
initialSelectionValue parameter (JOptionPane), 301
initialValue parameter (JOptionPane), 301
inProgress property
CompoundEdit class, 644
UndoManager class, 651
input dialogs, 296, 300
examples of, 301
return values for, 304
input maps, Mapper.java utility for, 1170
input stream, monitoring amount of data read into, 155
inputAttributes property
HTMLEditorKit class, 890
JTextPane class, 761
StyledEditorKit class, 870
InputMap class, 80-82
properties table for, 81
inputMap property (JComponent), 74
InputVerifier class, 732
inputVerifier property (JComponent ), 58
insersion methods, 763-765
insert( )
AccessibleText interface, 991
DefaultMutableTreeNode class, 600
JMenu class, 462, 465
JPopupMenu class, 453, 457
JTextArea class, 703
MutableTreeNode interface, 595
View class, 839
insertAfterStart( ), insertAfterEnd( ) (HTMLDocument), 894
insertBeforeStart( ), insertBeforeEnd( )
HTMLDocument class, 894
InsertBreakAction class, 864
insertComponent( ) (JTextPane), 764
InsertContentAction class, 864
insertElementAt( )
DefaultComboBoxModel class, 197
DefaultListModel class, 168
MutableComboBoxModel interface, 195
insertHTML( ) (HTMLEditorKit), 891
insertIcon( ) (JTextPane), 763
insertIndexInterval( ) (ListSelectionModel), 175
insertItemAt( ) (JComboBox), 201, 206
insertNodeInto( ) (DefaultTreeModel), 576
insertRow( ) (DefaultTableModel), 514
insertSeparator( ) (JMenu), 465
insertString( )
AbstractDocument class, 807
Content interface, 826
Document interface, 802, 809
DocumentFilter class, 845
DocumentFilter.FilterBypass, 846
GapContent class, 828
insertTab( ) (JTabbedPane), 337
InsertTabAction class, 864
insertUpdate( )
DocumentListener interface, 819
View class, 840
insets, defining for L&F, 1060
insets property (JComponent), 54, 57, 66
insideBorder property (CompoundBorder), 426
install( )
Caret interface, 737
DefaultCaret class, 738
DefaultFormatter class, 718
DefaultHighlighter class, 753
EditorKit class, 856, 908
Hightlighter interface, 750
HTMLEditorKit class, 890
JFormattedTextField.AbstractFormatter class, 715
StyledEditor class, 871
installBorder( ) (LookAndFeel), 1018-1019
installChooserPanel( ) (AbstractColor-ChooserPanel), 395
installColors( ) (LookAndFeel), 1019
installColorsAndFont( ) (LookAndFeel), 1019
installed L&Fs, 1029
installLookAndFeel( ) (UIManager), 1032
installUI( )
ComponentUI class, 1036
for UI delegates, 1069
intercellSpacing property (JTable), 493
internal frames, 13, 30-34, 259-285
adding to the desktop, 275, 278
borderless, 267
bounding, 279
building a desktop, 275-285
sample code for, 281-285
classes for, 260-275
demonstration of, 18
dialogs with, 311-313
example of, 303
events and, 268-269, 278
heavyweight components in, 1127
iconified view of, 267
iconifying/deiconifying, 278, 279
JInternalFrame class, 260-267
managing, 271-275
placement/movement of, 269
tiling, 275
internal methods, 206-208
internalFrame . . . ( ) (InternalFrameListener), 268-269
InternalFrameAdapter class, 269
InternalFrameEvent class, 268
InternalFrameListener interface, 268
internalSpacing property (JTable), 494
InternationalFormatter class, 724
internationalization
lists and, 188
support for, 724
intervalAdded( ) (ListDataEvent), 173
intervalRemoved( ) (ListDataEvent), 173
IntroExample.java (example), 434-436
invalidate( ) (JComponent), 56
invalidCharacters property (MaskFormatter), 723
invalidEdit( ) (JFormattedTextField.Abstract-Formatter), 716
inverted property (JSlider), 145
invokeAndWait( ) (SwingUtilities), 1080, 1118-1120
InvokeExample.java (example), 1120-1122
invokeLater( ) (SwingUtilities), 154, 1080, 1118-1120
invoker property (JPopupMenu), 454, 456
invokers, 453
invokesStopCellEditing (JTree), 583
IOStyledEditor.java (example), 878-880
is methods, 19, 1136
property tables and, xx
isBorderOpaque( ) (Border), 408
isCancelled( ) (ProgressMonitor), 153
isCellEditable( )
CellEditor interface, 534
TableModel interface, 508
isCollapsed( ) (JTree), 591
isCompletelyDirty( ) (RepaintManager), 1132
isDataFlavorSupported( ) (DropTargetDragEvent), 927
isDataFlavorSupported( ) (DropTargetDropEvent), 928
isDefined( )
AttributeSet interface, 769
SimpleAttributeSet class, 774
isDescendent( ) (TreePath), 604
isDescendingFrom( ) (SwingUtilities), 1080
isDoubleBuffered( ) (JComponent), 68
isDoubleBufferingEnabled( ) (RepaintManager), 1133
isEditing( ) (JTree), 592
isEqual( )
AttributeSet interface, 769
SimpleAttributeSet class, 774
isEventDispatchThread( ) (SwingUtilities), 1080
isExpanded( ) (JTree), 591
isFilled property (JSlider), 1051
isFlavorJavaFileListType( ) (DropTarget), 921
isFocusCycleRoot( ) (JComponent), 71, 1145
isFreeStanding property (JScrollBar), 1051
isGUIInitialized( ) (EventQueueMonitor), 998
isHiddenFile( ) (FileSystemView), 388
isLeaf( )
DefaultMutableTreeNode class, 600
TreeModel interface, 574
isLeftMouseButton( ) (SwingUtilities), 1080
isLightweightComponent( ) (JComponent), 79
isLocallyDefined( ) (Keymap), 756
isMenuComponent( ) (JMenu), 466
isMiddleMouseButton( ) (SwingUtilities), 1080
isNodeAncestor( ) (DefaultMutableTreeNode), 600
isNodeChild( ) (DefaultMutableTreeNode), 600
isNodeDescendent( ), DefaultMutableTreeNode class, 600
isNodeRelated( ) (DefaultMutableTreeNode), 601
isNodeSibling( ) (DefaultMutableTreeNode), 601
isOpaque( ) (JComponent), 1146
isOptimizedDrawingEnabled( )
JComponent class, 62
JViewport class, 331
isPaintingTile( ) (JComponent), 62
isPalette property (JInternalFrame), 267, 1051
isPathEditable( ) (JTree), 592
isPathSelected( )
JTree class, 590
TreeSelectionModel interface, 607
isPopupTrigger( )
JPopupMenu class, 458
MouseEvent class, 455
isRectangleContainingRectangle( ) (SwingUtilities), 1080
isRightMouseButton( ) (SwingUtilities), 1080
isRoot( )
DefaultMutableTreeNode class, 601
FileSystemView class, 388
isRowSelected( ) (TreeSelectionModel), 607
isSelected( )
ButtonGroup class, 131
ToggleButtonModel, 123
isSelectedIndex( ) (ListSelectionModel), 175
isTraversable( )
FileView class, 384
JFileChooser class, 379
isVisible( ) (JTree), 592
ItalicAction class, 874
item events, buttons and, 103, 114
item property
ComboBoxEditor interface, 198
JMenu class, 463
itemCount property
JComboBox class, 203
JMenu class, 463
iterator( ) (DragGestureEvent), 939
J[ Top ]
JApplet class, 254-258
properties table for, 257
Java Accessibility Helper (Sun), 1007
Java Development Kit (see JDK; SDK)
Java Foundation Classes (JFC), 2
Java Plug-in, 256
Java Swing (see Swing)
Java virtual machine (see JVM)
java.awt.datatransfer package, 931
java.awt.dnd package, 912
Javadoc, static methods and, 297
javax.swing package, 10
preparing for use, 22
javax.swing.text package, 681
javax.swing.text.html package, View classes in, 842
javax.swing.undo package, 633
JButton class, 111-120
actions and, 1171
icons, adding to JButtons buttons, 26-28
properties table for, 112
replacing AWT Buttons with JButtons, 23-26
JCheckBox class, 124-126
actions and, 1171
properties table for, 125
JCheckBoxMenuItem class, 469, 473
actions and, 1171
properties table for, 470
JColorChooser class, 389, 391-405
AbstractColorChooserPanel class, 394-395
DefaultColorSelectionModel class, 391
FontPicker.java (example), 405
javax.swing.colorchooser package for, xv, 10
JComboBox class, 200-208
actions and, 1171
internal methods for, 206-208
properties table for, 203
JComponent class, 52-79
building your own components, 1133-1155
component actions and (list), 1170-1192
look-and-feel and, 1015
properties table for, 54, 57
JComponent createEditor( ) (JSpinner), 211
JDesktopIcon class, 267
JDesktopPane class, 31, 269-271
actions and, 1172
properties table for, 270
sample desktop and, 275
using internal frame dialogs with, 311-313
JDialog class, 286-289
properties table for, 287
JDK (Java Development Kit), 1, 4
Release 1.1, xiii
vs. SDK, xvi
(see also SDK)
JEditorPane class, 849-854
actions and, 1172
HTML and, 880
properties table for, 851
registering editor kits, 911
JFC (Java Foundation Classes), 2
JFileChooser class, 367-380
examples of, 373-375
javax.swing.filechooser package for, 10
properties table for, 370
JFormattedTextField class, 208, 210, 708, 711-716
actions and, 1175
properties table for, 712
weaknesses of, 222
JFormattedTextField.AbstractFormatter class, 715
JFormattedTextField.AbstractFormatter-Factory class, 727
JFrame class, 246-251
PagingTester.java (example), 548
properties table for, 247
replacing AWT Frames with JPanels, 26
JInternalFrame class, 30, 260-267
actions and, 1176
constrained properties and, 278
JDesktopIcon class, 267
properties table for, 262
sample desktop and, 275
JIT compilers, 5
JLabel class, 84-94
actions and, 1176
ClockLabel.java (example), 1084
properties table for, 85
SimpleJLabelExample.java (example), 85
JLayeredPane class, 228, 239-246
methods for, 265
position and, 242
properties table for, 241
JList class, 162, 185-193
actions and, 1177
properties table for, 186
JMenu class, 434, 461-468
actions and, 1177
MenuExample.java (example), 466
properties table for, 463
JMenuBar class, 439-443
actions and, 1178
properties table for, 441
JMenuBar property
JApplet class, 257
JFrame class, 247
JInternalFrame class, 263
JRootPane class, 236
JMenuItem class, 434, 443-453
actions and, 1178
facilitating manager for, 348
properties table for, 448
jog shuttle component, 1146-1155
JOptionPane class, 289-313
actions and, 1178
dialogs and, 296-313
examples of, 301-303, 305-308
nonstatic methods of, 309
properties table for, 292
static methods vs. constructors, 305-309
using, 293
JOptionPane objects, reusing not recommended, 309
Joy, Bill, 4
JPanel class, 225-227
properties table for, 226
replacing AWT Panels with JPanels, 26
JPasswordField class, 698
actions and, 1178
JPopupMenu class, 453-460
actions and, 1180
PopupMenuEvent class, 460
PopupMenuExample.java (example), 459-460
PopupMenuListener interface, 461
properties table for, 455
JProgressBar class, 148-152
actions and, 1180
extent variable and, 149
properties table for, 149
JRadioButton class, 126-128
actions and, 1180
properties table for, 126
JRadioButtonMenuItem class, 472-476
actions and, 1180
properties table for, 474
JRootPane class, 228-231
actions and, 1180
JApplet class and, 254
JFrame class and, 247
JWindow class and, 251
properties table for, 236, 246
RootExample3.java (example), 231
RootExample.java (example), 229
JScrollBar class, 138-142
actions and, 1180
properties table for, 139
ScrollBarExample.java (example), 141
JScrollPane class, 320-332
actions and, 1181
headers and corners, 320, 325
heavyweight components in, 1127
JViewport class, 330-332
properties table for, 323
Scrollable interface, 326-327
ScrollBar class, 327
ScrollPaneLayout class, 327-330
table row headers, 540-543
JSeparator class, 476-478
properties table for, 477
JSlider class, 142-148
actions and, 1181
properties table for, 144
JSpinner class, 209
actions and, 1182
properties table for, 210
JSplitPane class, 314-320
actions and, 1182
properties table for, 316
JTabbedPane class, 333-339, 344-345
actions and, 1182
properties table for, 335
JTable class, 489-507
actions and, 1183
properties tables for, 492-494
row headers and, 540-543
JTableHeader class, 525
JTextArea class, 700-705
actions and, 1184
layout tips and, 705
OffsetTest.java (example), 704
properties table for, 701
JTextComponent class, 684-690
properties table for, 685
UI-related properties, 734-759
Caret interface, 734-737
CaretEvent class, 745
CaretListener interface, 745
DefaultCaret class, 737-745
DefaultHighlighter class, 752
DefaultHighlightPainter class, 753
Highlight interface, 749
Highlighter interface, 749-751
HighlightPainter interface, 746, 749
LayeredHighlighter class, 751
LineHighlightPainter.java (example), 747
JTextField class, 691-698
actions and, 1186
properties table for, 692
TextComponentSampler.java (example), 682-684
JTextFieldExample.java (example), 691
JTextPane class, 760-766
actions and, 1188
FontChooser.java (example), 401-405
FontPicker.java (example), 405
properties table for, 761
JToggleButton class, 12, 120-123
actions and, 1190
properties table for, 121
ToggleButtonModel class, 123
UndoableJToggleButton.java (example), 657
JToggleButtonEvents.java (example), 121
JToolBar class, 482-488
actions and, 1190
properties table for, 484
JToolBar objects, 37
JToolTip class, 1086
actions and, 1190
properties table for, 1087
JTree class, 579-593
actions and, 1190
Drag and Drop functionality and, 952, 955
inner classes of, 593
properties table for, 583
just-in-time (JIT) compilers, 5
JViewport class, 330-332
actions and, 1192
properties table for, 331
JVM (Java virtual machine), 968-972, 996-998
JWindow class, 251-254
properties table for, 253
Splash.java (example), 251
K[ Top ]
key bindings, 73
key selection manager, 206
keyboard
DefaultKeyTypedAction class, 863
functionality for, adding to components, 757-759
keyboard accelerators (shortcuts), 432
JMenu objects and, 462
menu items and, 87, 116-119, 444
(see also keystrokes)
keyboard actions, 72, 73
example of, 757-759
online material for, xix
keyboard events, 48, 72-75, 755
focus and, 70, 72
MenuKeyEvent class, 452
MenuKeyListener interface, 453
keyboard-driven selection, 182
KeyboardFocusManager class, 1108-1112
keyChar property
KeyStroke class, 1093
MenuKeyEvent class, 452
keyCode property
KeyStroke class, 1093
MenuKeyEvent class, 452
KeyEventDispatcher list, 1112
KeyEventPostprocessor list, 1112
Keymap interface, 734, 754-759
properties table for, 755
keymap property (JTextComponent), 686
KeymapExample.java (example), 757
keymaps, 734, 754-759
implementation for, 756
keys( )
ActionMap class, 83
InputMap class, 81
KeySelectionManager interface, 202
KeyStroke class, 444, 1093-1100
properties table for, 1093
keystrokes, 72, 1093-1100
mapping
to item selections in combo boxes, 202
to logical action names, 80
(see also keyboard accelerators)
killed edits, 677
L[ Top ]
L&F (see look-and-feel)
label property (JPopupMenu), 456
labelFor property (JLabel), 86-87
labels, 84-94
border around, 413
ClockLabel.java (example), 1084
content alignment and, 86, 88
content position and, 87
examples of, 87, 90, 1090
images in, 90-92
JLabel class, 84-94
layered, 339
SimpleJLabelExample.java (example), 85
for sliders, 142, 145
labelTable property (JSlider), 145
LabelView class, 841
LAFState class, 1028
largeModel property (JTree), 585
last( ) (Segment), 825
lastDividerLocation property (JSplitPane), 317
lastEdit( ) (CompoundEdit), 647
lastElement( ) (DefaultListModel), 168
lastIndexOf( ) (DefaultListModel), 167
lastRow property (TableModelEvent), 515
lastVisibleIndex property (JList), 187
layer property (JInternalFrame), 264
layered labels, OverlayLayout class for creating, 339
layered pane, 229, 239-246
JLayeredPane class, 239-246
methods for, 265
LayeredHighlighter class, 751
LayeredHighlighter.LayerPainter class, 752
layeredPane property
JApplet class, 257
JFrame class, 247
JInternalFrame class, 263
JWindow class, 252
layers
adding components to, 242-244
avoiding unnecessary, 235
current, for frame, 264
management methods for, 244-245
(see also panes)
layout managers, 314, 339-352
classes for, 342-365
overlapping heavyweight/lightweight components, 1125
overrides by, 64-65
read/write alignment properties and, 65
ScrollPaneLayout class, 327-330
size calculations for, 352-354
ViewportLayout class, 332
layout methods, 839
layout property
JApplet class, 258
JComponent class, 54
JDialog class, 288
JFrame class, 248
JLayeredPane class, 241
JRootPane class, 236
JTextComponent class, 687
JWindow class, 253
layoutCompoundLabel( ) (SwingUtilities), 1081
layoutManager property (JPanel), 226
layoutOrientation property (JList), 188
LazyValue interface, 1015, 1023
lead, lists and, 161
lead selection, 605
leadAnchorNotificationEnabled property (DefaultListSelectionModel), 176
leader property (TabStop), 794
leading for tab stops, 795
leadSelectionIndex property
DefaultListSelectionModel class, 176
JList class, 188
ListSelectionModel interface, 173
leadSelectionPath property (JTree), 585
leadSelectionRow property (JTree), 585
leaf property
Element interface, 800
TreeNode interface, 594
LeafElement class (AbstractDocument), 803
leaves (see trees)
leftComponent property (JSplitPane), 317
length of content, restricting, 809
length property
AbstractDocument class, 804
Document interface, 801
DocumentEvent interface, 820
length( )
Content interface, 826
GapContent class, 828
levels, nodes and, 571
lightweight components, 6-8, 17, 53, 1124-1127
overlapping with heavyweight, 1125
popup menus as, 456
repainting, 60
lightWeightPopupEnabled property
JComboBox class, 201-202
JComponent class, 1126
JPopupMenu class, 456
ToolTipManager class, 1086
limit property (UndoManager), 654
line transformation methods, 703
LineBorder class, 418
LineBorderUIResource class, 1027
lineCount property (JTextArea), 702
lineStyle property (JTree), 1051
lineWrap property (JTextArea), 702
link property (AccessibleText), 988
linkCount property (AccessibleText), 988
linkCursor property (HTMLEditorKit), 890
linkIndex property (AccessibleText), 988
links (see hyperlinks)
list data (see lists, list data)
list methods, 206
ListCellRenderer interface, 183, 201
ListDataEvent class, 171, 195, 197
properties table for, 171
ListDataListener interface, 172
ListEditor class (JSpinner), 220
properties table for, 221
listener lists, 1111
listener methods, 938
listeners
AbstractAction class, 45
AbstractButton class, 109
AccessibleComponent interface, 984
AccessibleContext class, 976
Action interface, 44
ActionListener interface, 28, 42
AncestorListener interface, 76
AWTEventMonitor class, 999
ButtonModel interface, 104
buttons and, 114
Caret interface, 737
CaretListener interface, 745
CellEditor interface, 533
CellEditorListener interface, 535
for change events, 52
ChangeListener interface, 52
ColorSelectionModel interface, 390
ComboBoxEditor interface, 198
for custom components, 1144
DefaultBoundedRangeModel class, 135
DefaultButtonModel class, 105
DefaultCellEditor class, 536
DefaultColorChooserModel class, 391
DefaultSingleSelectionModel class, 439
DefaultTreeCellEditor class, 625
Document interface, 801
DragGestureRecognizer class, 936
DragSource class, 943
DragSourceContext class, 946
for drop events, 918
DropTarget class, 922
EventListenerList class, 1089-1092, 1138
EventQueueMonitor class, 998
example of, 24
GUIInitializedListener interface, 1002
HyperlinkListener interface, 885
InternalFrameListener interface, 268
JComboBox class, 204
JComponent class, 76
JEditorPane class, 852, 885
JFileChooser class, 376
JInternalFrame class, 264
JProgressBar class, 150, 210
JScrollBar class, 141
JSlider class, 146
JTabbedPane class, 336
JTextComponent class, 687
JTextField class, 694
JViewport class, 332
lists
DefaultListSelectionModel interface, 177
JList class, 191
ListDataListener interface, 172
ListModel class, 164
ListSelectionListener class, 180
ListSelectionModel interface, 176
menus
JMenuItem class, 449
JPopupMenu class, 456
MenuDragMouseListener interface, 451
MenuKeyListener interface, 453
MenuListener interface, 469
PopupMenuListener interface, 461
MouseDragGestureRecognizer class, 938
MouseInputListener interface, 1100
PropertyChangeListener interface, 42, 76
SingleSelectionModel interface, 438
SpinnerModel interface, 213
SwingEventMonitor class, 1001
SwingPropertyChangeSupport class, 1101
tables
AbstractTableModel class, 511
DefaultTableColumnModel class, 504
TableColumn class, 500
TableColumnModel interface, 502
TableColumnModelListener interface, 505
TableModel interface, 508
TableModelListener interface, 516
text styles
Style interface, 771
StyleContext class, 782
Timer class, 1083
TopLevelWindowListener interface, 1002
trees
DefaultTreeSelectionModel class, 608
JTree class, 586
TreeExpansionListener interface, 615
TreeModel interface, 573
TreeSelectionListener interface, 614
TreeSelectionModel interface, 606-607
TreeWillExpandListener interface, 615
UIDefaults class, 1020
UIManager class, 1031
UndoableEditListener interface, 635, 650
UndoableEditSupport class, 674
VetoableChangeListener interface, 76, 278
(see also events)
ListExample.java (example), 192
ListModel interface, 162, 164
properties table for, 164
ListModelExample.java (example), 169
lists, 159-208
EventListenerList class, 1089-1092, 1138
examples of, 159-161, 178
JList class, 185-193
list data, 162, 164-173
adding/removing, 169-171
ListCellRenderer interface, 183
rendering, 182-185
retrieving/pointing to, 196
list selections, 162, 173-182
changes in, 176-182
example of, 178
keyboard-driven, 182
scrolling and, 190
parts of, 162
rendering data, 163
selectiing items within, 161
selection model, bug in, 171
(see also combo boxes; spinners)
ListSelectionEvent class, 179-182, 191
properties table for, 180
ListSelectionListener class, 180
ListSelectionModel interface, 162, 173-176
properties table for, 174
selecting table data and, 526
literals/nonliterals, 721
LiveParenMatcher.java (example), 819
LnFListener.java, 24
loadBackgroundImage( ) (EditorCanvas), 277
loadKeymap( ) (JTextComponent), 690
locale property (JComponent), 55
location property
AccessibleComponent interface, 984
DropTargetDragEvent class, 926
DropTargetDropEvent class, 928
JComponent class, 55, 57, 63
JPopupMenu class, 454-455
location (see position)
locationOnScreen property
AccessibleComponent interface, 984
JComponent class, 55
locationToIndex property (JList), 190
locking documents, 806
logical styles, 762
logicalStyle property (JTextPane), 761
logTimers property (Timer), 1083
LookAndFeel class, 1014-1020, 1056-1063
properties table for, 1017
look-and-feel (L&F), 6, 1009-1075
Alt key for, 103
building your own, 1038-1040, 1054-1075
for button borders, 108
for buttons, 112
for checkboxes, 124
classes/interfaces for, 1014-1036
client properties and, 67
for combo boxes, 200
component actions and, 1170-1192
customizing existing L&F, 1043-1054
for Drag and Drop, 188
examples of, 1029, 1038-1046, 1056
for file choosers, 367
for formatted text fields, 708
helper classes for, 631
how it works, 1011-1014
internal frames and, 261
javax.swing.plaf package for, 10
JDesktopPane class and, 269, 271
JOptionPane class and, 289
keyboard accelerators and, 444
for lists, 185
for Mac OS X, 1010
menu bars and, 440
Metal (see Metal look-and-feel)
mnemonics and, 444
for progress bars, 148
for scrollbars, 138
selectable menu items and, 472
for separators, 476
for sliders, 143
for spinners, 208
swing.properties file, 1030
for tabbed panes, 335
for text, 681
text fields and, 691
for trees, 567, 616, 619
UI delegates, replacing individual, 1051-1054
UI resources for (list), 1157-1169
UIManager and, 1028
LookAndFeelInfo class, 1015, 1034
lowestLayer( ) (JLayeredPane), 245
M[ Top ]
Mac OS X
ColorPicker3 and, 400
L&F for, 1010
macmetrics.jar utility for, xix
root directory and, 388
magicCaretPosition property (Caret), 736
magnifier pane for images, 330
major tick marks (sliders), 145
majorTickSpacing property (JSlider), 144-145
makeIcon( ) (LookAndFeel), 1019
makeVisible( ) (JTree), 592
manager property
MenuDragMouseEvent class, 451
MenuKeyEvent class, 452
managingFocus property (JComponent), 57
manipulation methods, 362
Mapper.java utility, 1170
margin property
AbstractButton property, 108
JMenuBar class, 442
JPopupMenu class, 455
JTextComponent class, 687
JToolBar class, 484
MarginBorder class, 1065
mark property
Caret interface, 736
CaretEvent class, 745
markCompletelyClean( ) (RepaintManager), 1132
markCompletelyDirty( ) (RepaintManager), 1132
MarketDataModel.java (example), 518
MarketTable.java (example), 520
mask property (MaskFormatter), 723
MaskFormatter class, 721-724
properties table for, 722
masks, 721
matte borders, 406
MatteBorder class, 420-422
properties table for, 420
MatteBorderUIResource class, 1027
MatteExample.java (example), 421
maxCharactersPerLine property (JOptionPane), 291
maxima of bounded ranges, 132-134
maximizable property (JInternalFrame), 263
maximizeFrame( )
DefaultDesktopManager class, 273
DesktopManager interface, 272
maximum property
BoundedRangeModel interface, 133
InternationalFormatter class, 725
JInternalFrame class, 263
JProgressBar class, 149
JScrollBar class, 139
JSlider class, 145
ProgressMonitor class, 153
SpinnerNumberModel class, 216
maximumRowCount property (JComboBox), 202
maximumSize property
JComponent class, 57, 65
JScrollBar class, 139
maximumSpan property (View), 836
MaxLengthDocument.java (example), 810
maxSelectionIndex property
JList class, 188
ListSelectionModel interface, 173
maxSelectionRow property
JTree class, 585
TreeSelectionModel interface, 605
maxWidth property (TableColumn), 500
maybeLoadAssistiveTechnologies( ) (EventQueueMonitor), 999
MDI (see internal frames)
menu items (see menus, menu items)
menu property (JMenuBar), 441
MenuBarBorder class, 1065
menuCanceled( ) (MenuListener), 469
menuComponent property (JMenu), 464
menuComponentCount property (JMenu), 464
menuComponents property (JMenu), 464
menuCount property (JMenuBar), 441
menuDeselected( ) (MenuListener), 469
menuDragMouse . . . ( ) (MenuDragMouseListener), 451
MenuDragMouseEvent class, 450
MenuDragMouseListener interface, 451
MenuElement interface, 434, 478-482
custom menu items and, 478
JMenu class, 466
popup menus and, 458
MenuElementExample.java (example), 479-481
MenuEvent class, 468
MenuExample.java (example), 466
menuKey . . . ( ) (MenuKeyListener), 453
MenuKeyEvent class, 452
MenuKeyListener interface, 453
MenuListener interface, 469
menus, 432-482
activated (raised) vs. canceled, 439
anchored menus, 461-469
class hierarchy for, 433
components of, 462
event handling
DefaultSingleSelectionModel class, 439
JMenu class, 466
JMenuItem class, 449
JPopupMenu class, 456
MenuDragMouseEvent class, 450
MenuDragMouseListener interface, 451
MenuEvent class, 468
MenuKeyEvent class, 452
MenuKeyListener interface, 453
PopupMenuEvent class, 460
SingleSelectionModel interface, 438
examples of, 434-436
menu bars, 432, 437-443
JMenuBar class, 439-443
positioning, 439
menu items, 432
actions, creating for, 45-47
creating via actions, 116
custom, 478-482
event handling for, 447
icons and, 445
JMenu class, 462
JMenuItem class, 443-453
MenuElement interface, 478-482
selectable, 469-482
shortcuts for, 444
(see also checkboxes; radio buttons)
MenuSelectionManager class, 434
popup menus
JMenu class, 462
JPopupMenu class, 453-460
for pie charts (example), 565
separators for, 432, 476-478
title buttons and, 434
vs. toolbars, 432
top-level, 461
working with, 466-468
menuSelected( ) (MenuListener), 469
menuSelectionChanged( )
JMenu class, 466
JMenuItem class, 450
JPopupMenu class, 458
MenuElement interface, 479
MenuSelectionManager class, 434
message area, in dialogs, 293
message dialogs, 296
example of, 302
return values for, 304
message parameter (JOptionPane), 299
messages, in dialogs, 299
messageType parameter (JOptionPane), 300
Metal look-and-feel (Metal L&F), 31, 1046-1051
client properties for, 1050
default button and, 114
demonstration of, 18
examples of, 1052-1053
icons and, 616
isPalette property and, 267
for sliders, 146
MetalModExample.java (example), 1053
MetalTheme class, 1046-1050
properties table for, 1047
methods, 55
accessor, 782, 784
add/remove, 773
attribute and style, 762
AttributeContext, 783
break, 838
buttons and, 104
child access, for nodes, 594
chooser panel, 395
class instantiation, 388
client property, 79
constraint, 357
content style, 815
control, 319
delegation, 812, 816
dialog, 380, 393
directory, 379
drag, 927
drag initiation, 939
drop, 928
editing, 210
for tree cells, 592
edit-merging, 637
editor kit, 853, 890
element lookup, 800
enumeration, 601
event, 75, 946
Drag and Drop, 919
event list, 939
expansion, 590
for files/folders, 378-379, 388
filter bypass, 848
focus, 70-72, 78
graphics, 77
HTML document, 891
image, 1088
internal, 206-208
layer management, 244-245
layout, 839
line transformation, 703
list, 206
listener, 938
locking, 806
manipulation, for springs, 362
mouse, 739, 938
mutation, 595
named style, 765
nonstatic, 309
output-generating, 902
pane component, 324
path and row, 591
protected helper, 394
query, 773, 812
selection, 589, 607
serialization, 784
shortcut, 419
start, 944
structure, 597-601
style, 762, 784, 811
tab, 337
table editor, 536
text manipulation, 703, 807, 991
tooltip, 79
transfer data, 927-928
translation, 837
tree, 536, 839
trigger event list, 937
update, 840
user interface, 258
utility, 775
viewport dimension, 327
writing, 904, 906
mice (see entries at mouse)
millisToDecideToPopup property (ProgressMonitor), 153
millisToPopup property (ProgressMonitor), 154
MiniBrowser.java, 881-883
minima of bounded ranges, 132-134
MinimalHTMLWriter class, 904-906
minimizeFrame( )
DefaultDesktopManager class, 274
DesktopManager interface, 272
minimum property
BoundedRangeModel interface, 133
InternationalFormatter class, 725
JProgressBar class, 149
JScrollBar class, 139
JSlider class, 145
ProgressMonitor class, 153
SpinnerNumberModel class, 216
minimumSize property
JComponent class, 57, 65
JScrollBar class, 139
minimumSpan property (View), 836
minor tick marks (sliders), 145
minorTickSpacing property (JSlider), 145
minSelectionIndex property
JList class, 188
ListSelectionModel interface, 173
minSelectionRow property
JTree class, 585
TreeSelectionModel class, 605
minWidth property (TableColumn), 500
MixerModel.java (example), 551
MixerTest.java (example), 552
mnemicAt property (JTabbedPane), 335
mnemonic property
AbstractButton class, 109
AbstractColorChooserPanel class, 394
ButtonModel interface, 103
JMenuItem class, 445, 462
Mnemonic.java (example), 116-119
MnemonicLabels.java (example), 87
mnemonics, 86-88, 116-119
AbstractColorChooserPanel class and, 394
for file chooser dialog approve button, 372
menu items and, 444
menus and, 432
Mnemonic.java (example), 116-119
MnemonicLabels.java (example), 87
for tabbed pane tabs, 335
modal dialogs, 286, 294
modal property (JDialog), 288
model-delegate architecture, 15
model events, 609
model property
AbstractButton class, 108
JButton class, 112
JList class, 187
JTabbedPane class, 334
modelIndex property (TableColumn), 500
models for components, 13, 1134-1141
AbstractListModel class, 162, 165
AbstractSpinnerModel class, 213
AbstractTableModel class, 508-512
FileModel.java (example), 509
FileTable.java (example), 510
PagingModel.java (example), 544-547
BoundedRangeModel interface, 132
ButtonModel interface, 101-104
ColorSelectionModel interface, 390
ComboBoxModel interface, 194
DefaultBoundedRangeModel class, 135-138
DefaultButtonModel class, 104
DefaultColorSelectionModel class, 391
DefaultListModel class, 162, 166-171
DefaultListSelectionModel class, 162, 176-179
DefaultSingleSelectionModel class, 438
DefaultTableColumnModel class, 503
DefaultTableModel class, 512-515
DefaultTreeModel class, 574-577
ObjectTree.java (example), 588
DefaultTreeSelectionModel class, 607-609
Document model, 797-818
examples of, 1137, 1140
ListModel interface, 162, 164
ListSelectionModel interface, 173-176
MixerModel.java (example), 551
properties for, 1139
reusing/extending, 1135
SingleSelectionModel interface, 437
SpinnerDateModel, 213
SpinnerListModel class, 214
SpinnerModel interface, 212
SpinnerNumberModel class, 215
TableColumnModel interface, 501-503
TableModel interface, 507
ToggleButtonModel class, 123
TreeModel interface, 573
TreeSelectionModel interface, 605-607
modelToView( )
JTextComponent class, 689
View class, 837
Model-View-Controller architecture (see MVC architecture)
modifier keys, 161, 185
modifiers property
KeyStroke class, 1093
MenuDragMouseEvent class, 451
MenuKeyEvent class, 452
monitoring progress (see progress monitoring)
MonthSpinner.java (example), 218
mouse clicks, multiple, 108
mouse, enabling/disabling scrolling support for, 323
mouse events, 48, 1100
blocking, glass pane and, 232-235
border rollover effect and, 413
focus and, 70
glass pane and, 267
list selections and, 176
MenuDragMouseEvent class, 450
MenuDragMouseListener interface, 451
tooltips and, 66
mouse methods, 739, 938
mouseClicked( )
DefaultCaret class, 739
MouseDragGestureRecognizer class, 938
MouseInputAdapter class, 1100
mouseDragged( )
DefaultCaret class, 739
MouseDragGestureRecognizer class, 938
MouseInputAdapter class, 1100
MouseMotionListener interface, 919
MouseDragGestureRecognizer class, 937
mouseEntered( )
DefaultCaret class, 739
MouseDragGestureRecognizer class, 938
MouseInputAdapter class, 1100
mouseExited( )
DefaultCaret class, 739
MouseDragGestureRecognizer class, 938
MouseInputAdapter class, 1100
MouseInputAdapter class, 1100
MouseInputListener interface, 1100
mouseMoved( )
DefaultCaret class, 739
MouseDragGestureRecognizer class, 938
MouseInputAdapter class, 1100
mousePressed( )
DefaultCaret class, 739
MouseDragGestureRecognizer class, 938
MouseInputAdapter class, 1100
mouseReleased( )
DefaultCaret class, 739
MouseDragGestureRecognizer class, 938
MouseInputAdapter class, 1100
moveCaret( ) (DefaultCaret), 740
moveCaretPosition( ) (JTextComponent), 688
moveColumn( )
DefaultTableColumnModel class, 504
JTable class, 498, 525
TableColumnModel interface, 503
moveDot( )
Caret interface, 737
DefaultCaret class, 739
NavigationFilter class, 848
moveRow( ) (DefaultTableModel), 514
moveToBack( )
JInternalFrame class, 265
JLayeredPane class, 245
moveToFront( )
JInternalFrame class, 265-266
JLayeredPane class, 245
multiClickThreshhold property, 108
MultiHighlight.java (example), 750
MultiLookAndFeel class, 1016, 1037-1041
installing, 1040
multiple document interface (see internal frames)
multiSelectionEnabled property (JFileChooser), 371
multithreading, 16, 1116-1123
applets and, 256
event dispatch thread, 1118-1123
example of, 1120-1122
music, player for, 372
MutableAttributeSet interface, 766, 769
MutableComboBoxModel interface, 195
MutableTreeNode interface, 594
properties table for, 595
mutation methods, 595
MVC architecture, 13-16
Document model and, 797
MyFilterChooser.java (example), 381
MyMetalScrollBarUI.java (example), 1052
MYOSM.java (example), 517-518
MyViewChooser.java (example), 387
N[ Top ]
name property
Element interface, 800
JComponent class, 55
Keymap interface, 755
LookAndFeel class, 1017
LookAndFeelInfo class, 1034
Style interface, 771
named style methods, 765
named styles, 762
nativeLookAndFeel property (LookAndFeel), 1017
NavigationFilter class, 847
navigationFilter property (JTextComponent), 687
nested edit support, 675
newDataAvailable( ) (DefaultTableModel), 513
newRowsAdded( ) (DefaultTableModel), 513
next( )
ElementIterator class, 822
Segment class, 825
nextFocusableComponent property (JComponent), 57, 71
nextTabStop( ) (TabExpander), 842
nodeChanged( ) (DefaultTreeModel), 575
nodes, 567, 570
adding/removing, 577
Drag and Drop for, 952-960
editing, 623
rendering, 616-618
(see also trees, nodes and paths)
nodesChanged( ) (DefaultTreeModel), 575
nodeStructureChanged( ) (DefaultTreeModel), 576
nodesWereInserted( ) (DefaultTreeModel), 576
nodesWereRemoved( ) (DefaultTreeModel), 576
noniconified frames, 275
nonliterals, 721
non-modal dialogs, 286
note property (PropertyMonitor), 153
number property (SpinnerNumberModel), 216
NumberEditor class (JSpinner), 221
properties table for, 222
NumberFormatter class, 726
numbers
formatters for editing combinations, 718
formatting, 726
JFormattedTextField class and, 714
O[ Top ]
object graphs, 69
object reuse, LineBorder class and, 419
object serialization, 69
ObjectTree.java (example), 588
offscreen buffers (see double buffering)
offset property
DocumentEvent interface, 820
Position interface, 831
offsetRequested( ) (BadLocationException), 831
OffsetTest.java (example), 704
old( ) (DefaultListModel), 168
oneTouchExpandable property (JSplitPane), 317
onKeyRelease property (KeyStroke), 1093
opaque property
Container class, 61
DefaultTableCellRenderer class, 531
JComboBox class, 204
JComponent class, 57
JDesktopPane class, 270
JList class, 187
JPanel class, 226
OpaqueExample.java (example), 226
opaqueness (see transparency)
openFrame( )
DefaultDesktopManager class, 274
DesktopManager interface, 272
optimizedDrawingEnabled property
JComponent class, 57, 62
JLayeredPane class, 241
option dialogs, 296, 301
return values for, 304
options for dialogs, 299
options parameter (JOptionPane), 301
optionType parameter (JOptionPane), 299
OptPaneComparison.java (example), 305-308
oraswing.jar, xix
organization charts, 567
orientation property
JProgressBar class, 149
JScrollBar class, 138
JSlider class, 144
JToolBar class, 484
output-generating methods, 902
outsideBorder property (CompoundBorder), 426
OvalIcon.java (example), 95
OverlayLayout class, 339, 348-352
overridden properties, xxi
overwriteMode property
DefaultFormatter class, 717
InternationalFormatter class, 725
P[ Top ]
pack( )
JComponent class, 55
JInternalFrame class, 266
packages in Swing libraries (list), 10
page frames, 39
creating, 36
page property (JEditorPane), 852
PageFrame class, 36
PageFrame.java (example), 39
paging large tables, 543-549
PagingModel.java (example), 544-547
PagingTester.java (example), 548
paint( ), 1142
Caret interface, 737
cell renderers and, 182
ComponentUI class, 1036
DefaultCaret class, 739
DefaultHighlighter class, 753
DefaultHighlightPainter class, 754
Highlighter interface, 750
HighlightPainter interface, 746
JComponent class, 61, 77, 1130
View class, 836
paintBorder( )
AbstractBorder class, 410
Border interface, 408
CompoundBorder class, 427
EmptyBorder class, 416
EtchedBorder class, 418
JComponent class, 61, 77
LineBorder class, 419
MatteBorder class, 421
[Soft]BevelBorder classes, 413
TitledBorder class, 425
paintChildren( ) (JComponent), 61, 77
paintComponent( )
JComponent class, 77
SwingUtilities class, 1081
paintComponent( ) (JComponent), 61
paintDirtyRegions( ) (RepaintManager), 1132
painter property (Highlight), 749
paintFocus( ) (BasicSliderUI), 1072
paintIcon( )
Icon interface, 95
ImageIcon class, 100
paintImmediately( ) (JComponent), 78, 1130
painting components, 59-63, 1128-1133
debugging, 69
examples of, 562-563
paintingTile property (JComponent), 57, 62
paintLabels property (JSlider), 144-145
paintLabels( ) (BasicSliderUI), 1072
paintLayer( ) (DefaultHighlightPainter), 754
paintLayeredHighlights( ) (LayeredHighlighter), 752-753
paintMajorTickForHorizSlider( ) (BasicSliderUI), 1072
paintMajorTickForVertSlider( ) (BasicSliderUI), 1072
paintMinorTickForHorizSlider( ) (BasicSliderUI), 1072
paintMinorTickForVertSlider( ) (BasicSliderUI), 1072
paintThumb( ) (BasicSliderUI), 1072
paintTicks property (JSlider), 145
paintTicks( ) (BasicSliderUI), 1072
paintTrack property (JSlider), 145
paintTrack( ) (BasicSliderUI), 1072
PaneInsertionMethods.java, 764
panels, 225-227, 394-400
JPanel class, 225-227
replacing AWT Panels with JPanels, 26
sample implementation of, 396-397
panes
CellRendererPane class, 1087
content pane, 229
examples of, 764
glass (see glass pane)
image magnifier, 330
JDesktopPane class, 269-271
using internal frame dialogs with, 311-313
JEditorPane class, 849-854
registering editor kits, 911
JLayeredPane class, 239-246
JOptionPane class, 289-313
dialogs and, 296-313
JScrollPane class, 320-332
headers and corners, 320, 325
heavyweight components in, 1127
vs. JViewport class for displaying components, 330-332
Scrollable interface, 326-327
ScrollPaneLayout class, 327-330
table row headers, 540-543
ViewportLayout class, 332
JSplitPane class, 314-320
JTabbedPane class, 333-339
SimpleTab.java (example), 333
JTextPane class, 401-405
layered (see layered pane)
OptPaneComparison.java (example), 305-308
overlapping heavyweight/lightweight components, 1125
OverlayLayout class, 348-352
root pane, 228-246
ScrollPaneLayout class, 327-330
SimpleLayers.java (example), 239
specialty, 314-339
paragraph attributes, 762, 776
paragraphAttributes property (JTextPane), 761
ParagraphConstants class (StyleConstants), 779
ParagraphView class, 841
paramString( ) (JMenu), 466
ParenMatcher.java (example), 816-818
parent, dialogs and, 297
parent property
ActionMap class, 82
InputMap class, 80-81
JComponent class, 55
JDialog class, 288
MutableTreeNode interface, 595
TreeNode interface, 594
parent/child relationship of components and containers, 53
parentComponent parameter (JOptionPane), 297
parentElement property (Element), 800
parentheses, 816-820
parentPath property (TreePath), 603
parents, trees and, 571
parser property
HTMLDocument class, 893
HTMLEditorKit class, 890
partialReturn property (Segment), 824
passwords, 698
PasswordView class, 841
paste( )
AccessibleText interface, 991
JTextComponent class, 688
PasteAction class, 864
pasteAction property (TransferHandler), 933
path property
MenuDragMouseEvent, 451
MenuKeyEvent class, 452
TreeExpansionEvent class, 614
TreeModelEvent class, 611
TreePath class, 603
pathByAddingChild( ) (Tree Path), 604
pathCount property (TreePath), 603
pathFromAncestorEnumeration( ) (DefaultMutableTreeNode), 602
paths, 571
path and row methods for, 591
vs. rows, 604
(see also trees, nodes and paths)
percentComplete property (JProgressBar), 150
performance, cell renderers and, 184
permanentFocusOwner property (KeyboardFocusManager), 1110
pie charts, 557-566
PieChartPainter.java (example), 563
placeholder property (MaskFormatter), 723
placeholderCharacter property (MaskFormatter), 723
placement (see position)
PLAF architecture (see look-and-feel)
PlainBorders.java (example), 1066
PlainDocument class, 808-810
PlainIconFactory.java (example), 1063
PlainLookAndFeel.java (example), 1056
PlainSliderUI.java (example), 1068, 1074
PlainView class, 841
pluggable look-and-feel (see look-and-feel)
pop-up menus, 432, 453-461
displaying, 454
heavyweight vs. lightweight components and, 1126
JPopupMenu class, 453-460
listener for, 205
for pie charts (example), 565
popupMenu property (JMenu), 463
popupMenuCanceled( ) (PopupMenuListener), 461
PopupMenuEvent class, 460
PopupMenuExample.java (example), 459-460
PopupMenuListener interface, 205, 461
popupMenuVisible property (JMenu), 462-463
popupMenuWillBecomeInvisible( ) (PopupMenuListener), 461
popupMenuWillBecomeVisible( ) (PopupMenuListener), 461
popups, in combo boxes, 193, 200-202
popupTrigger property (MenuDragMouseEvent), 451
popupVisible property (JComboBox), 202
position
BadLocationException class, 830
of components, 63-65
in layers, 245
JLayeredPane class, 242
of menu bars, 439
of menu item images, 445
Position interface, 831
Position.Bias class, 831
of tabs, 794
of toolbars, 483
Position interface, 831
position property (TabStop), 794
Position.Bias class, 831
positionCaret( ) (DefaultCaret), 740
postActionEvent( ) (JTextField), 694
postEdit( ) (UndoableEditSupport), 675
postEvent( ) (EventQueueMonitor), 999
postorderEnumeration( ) (DefaultMutableTreeNode), 602
preferenceChanged( ) (View), 839
preferredScrollableViewportSize property
JList class, 188
JTable class, 493
JTextArea class, 701
JTextComponent class, 687
JTree class, 584
preferredSize property
JComponent class, 57, 65
JTextArea class, 701
JTextField class, 693
preferredSpan property (View), 835
preorderEnumeration( ) (DefaultMutableTreeNode), 602
presentationName property
AbstractUndoableEdit class, 639
CompoundEdit class, 645
StateEdit class, 667
UndoableEdit interface, 637
preserveUnknownTags property (HTMLDocument), 894
pressed property (ButtonModel), 103
pressedIcon property (AbstractButton), 108
preview panels for chooser dialogs, 399
previewPanel property (JColorChooser), 392, 399
previous( )
ElementIterator class, 823
Segment class, 825
Print button, list selections and, 193
print( ), print . . . ( ) (JComponent), 61
procedures, actions and, 41
processKeyEvent( )
JComboBox class, 206
JMenu class, 466
JMenuItem class, 450
JPopupMenu class, 458
MenuElement interface, 479
processMenuDragMouseEvent( ) (JMenuItem), 449
processMenuKeyEvent( ) (JMenuItem), 449
processMouseEvent( )
JMenuItem class, 450
JPopupMenu class, 455, 458
MenuElement interface, 479
processWindowEvent( ) (JFrame), 249
programs (see applications)
progress bars, 132, 148-154
strings painted onto, 150
progress monitoring, 152-158
progress property (ProgressMonitor), 153, 156
ProgressBarExample.java (example), 151
ProgressMonitor class, 152-155
properties table for, 153
progressMonitor property (ProgressMonitorInputStream), 156
ProgressMonitorInputExample.java (example), 157
ProgressMonitorInputStream class, 155-158
properties table for, 156
properties, 19
accessor methods for, 1136, 1144
vs. client properties, 67
constrained, 263, 278
for custom components, 1143
for custom models, 1139
inherited, 53-55
PropertyChangeEvent class, 51, 75
PropertyChangeListener interface, 42, 76
PropertyChangeSupport class, 1101
SwingPropertyChangeSupport class, 1101
tables listing, xx
types of, 1136
properties tables, xx, 19
property editors, 286
propertyChange( ) (DefaultTableColumnModel), 504
PropertyChangeEvent class, 51, 75
PropertyChangeListener interface, 42, 76
PropertyChangeListener list, 1111
PropertyChangeSupport class, 1101
protected properties, xxi
prototypeCellValue property (JList), 188
prototypeDisplayValue property (JComboBox), 204
public access methods, 40
push buttons (see buttons)
put( )
ActionMap class, 83
InputMap class, 81
UIDefaults class, 1022
UIManager class, 1157
putClientProperty( ) (JComponent), 67, 79
putConstraint( ) (SpringLayout), 357
putDefaults( ) (UIDefaults), 1022
putLayer( ) (JLayeredPane), 246
putProperty( ) (Document), 802, 808
Q[ Top ]
query methods, 773, 812
QueryTableModel.java (example), 523-525
queueWindowEvent( ) (EventQueueMonitor), 999
R[ Top ]
radio buttons, 126-128, 472-476
RadioButtonBorder class, 1065
RadioButtonMenuItemExample.java (example), 474
ranges (see bounded ranges)
read( )
DefaultEditorKit class, 863
EditorKit class, 856
HTMLEditorKit class, 891
JTextComponent class, 690
ProgressMonitorInputStream class, 157
readAttributes( ) (StyleContext), 785
readAttributeSet( ) (StyleContext), 785
readLock( ) (AbstractDocument), 806
readObject( )
ImageIcon class, 100
ObjectInputStream class, 69
readUnlock( ) (AbstractDocument), 807
reclaim( ) (StyleContext), 783
Record.java (example), 548
Rectangle class, vs. SpringLayout.Constraints class properties, 360
Rectangle interface, 833
rectangles, viewable, 330
redo (see undo)
redo( )
AbstractUndoableEdit class, 640
CompoundEdit class, 647
StateEdit class, 669
UndoableEdit interface, 638
UndoManager class, 655
redoPresentationName property
AbstractUndoableEdit class, 639
CompoundEdit class, 645
UndoableEdit interface, 637
UndoManager class, 654
redoTo( ) (UndoManager), 656
RedTheme.java (example), 1046
RegexPatternFormatter.java (example), 731
registerComponent( ) (ToolTipManager), 1086
registerEditorKitForContentType( ) (JEditorPane), 853
registeredKeyStrokes property (JComponent), 58
registerListeners( )
DragGestureRecognizer class, 936
MouseDragGestureRecognizer class, 938
registerStaticAttribute( ) (StyleContext), 785
registerStaticAttributeKey( ) (StyleContext), 785
regular expressions, formatters for, 731-732
rejectDrag( ) (DropTargetDragEvent), 927
rejectDrop( ) (DropTargetDropEvent), 928
relation sets, 993
RelativeLayout, 355
reload( ) (DefaultTreeModel), 577
remove methods, 773
remove( )
AbstractDocument class, 807
AccessibleStateSet class, 980
ActionMap class, 83
ButtonGroup class, 128, 131
Content interface, 826
DefaultListModel class, 169
DefaultMutableTreeNode class, 601
Document interface, 802
DocumentFilter class, 845
DocumentFilter.FilterBypass, 846
EventListenerList class, 1092
GapContent class, 828
InputMap class, 82
JComponent class, 55
JLayeredPane class, 245
JMenu class, 465
JSplitPane class, 319
JTabbedPane class, 338
MutableTreeNode interface, 595
View class, 839
removeAccessibleSelection( ) (AccessibleSelection), 986
removeActionListener( )
AbstractButton class, 109
ButtonModel interface, 104
ComboBoxEditor interface, 198
DefaultButtonModel class, 105
JComboBox class, 204
JFileChooser class, 376
JTextField class, 694
Timer class, 1083
removeAdjustmentListener( ) (JScrollBar), 141
removeAll( )
JComponent class, 55
JMenu class, 465
JSplitPane class, 319
JTabbedPane class, 338
View class, 839
removeAllChildren( ) (DefaultMutableTreeNode), 601
removeAllElements( )
DefaultComboBoxModel class, 197
DefaultListModel class, 168
removeAllHighlights( )
DefaultHighlighter class, 753
Highlighter interface, 750
removeAllItems( ) (JComboBox), 206
removeAncestorListener( ) (Component), 76
removeAttribute( )
MutableAttributeSet interface, 770
SimpleAttributeSet class, 773
StyleContext class, 783
removeAttributes( )
MutableAttributeSet interface, 770
SimpleAttributeSet class, 773
StyleContext class, 783
removeBindings( ) (Keymap), 756
removeCaretListener( ) (JTextComponent), 687
removeCellEditorListener( )
CellEditor interface, 534
DefaultTreeCellEditor class, 625
removeChangeListener( )
AbstractButton class, 109
BoundedRangeModel interface, 134
ButtonModel interface, 104
Caret interface, 737
ColorSelectionModel interface, 390
DefaultBoundedRangeModel class, 135
DefaultButtonModel class, 105
JProgressBar class, 150, 210
JSlider class, 146
JTabbedPane class, 336
JViewport class, 332
SingleSectionModel interface, 438
SpinnerModel interface, 213
Style interface, 771
StyleContext class, 782
removeChoosableFileFilter( ) (JFileChooser), 379
removeChooserPanel( ) (JColorChooser), 393
removeColumn( )
DefaultTableColumnModel class, 504
JTable class, 498
TableColumnModel interface, 503
removeColumnModelListener( )
DefaultTableColumnModel class, 504
TableColumnModel interface, 502
removeColumnSelectionInterval( ) (JTable), 498, 525
removeDocumentListener( )
AbstractDocument class, 804
Document interface, 801
removeDragGestureListener( ) (DragGestureRecognizer), 936
removeDragSourceListener( )
DragSource class, 943
DragSourceContext class, 946
removeDragSourceMotionListener( ) (DragSource), 943
removeDropTargetListener( ) (DropTarget), 922
removeElement( )
DefaultComboBoxModel class, 196
DefaultListModel class, 168
MutableComboBoxModel interface, 195
removeElementAt( )
DefaultListModel class, 168
MutableComboBoxModel interface, 195
removeFocusListener( ) (AccessibleComponent), 985
removeFromParent( )
DefaultMutableTreeNode class, 601
MutableTreeNode interface, 595
removeGUIInitializedListener( ) (EventQueueMonitor), 998
removeHighlight( )
DefaultHighlighter class, 753
Hightlighter interface, 750
removeHyperlinkListener( ) (JEditorPane), 852
removeIconFor( ) (DefaultDesktopManager), 275
removeIndexInterval( ) (ListSelectionModel), 175
removeInternalFrameListener( ) (JInternalFrame), 264
removeInvalidComponent( ) (RepaintManager), 1129, 1131
removeItem( ) (JComboBox), 201, 206
removeItemAt( ) (JComboBox), 201, 206
removeItemListener( )
AbstractButton class, 109
ButtonModel interface, 104
DefaultButtonModel class, 105
JComboBox class, 204
removeKeymap( ) (JTextComponent), 690
removeKeyStrokeBinding( ) (Keymap), 756
removeListDataListener( ) (ListModel), 164
removeListSelectionListener( )
DefaultListSelectionModel interface, 177
JList class, 191
ListSelectionModel interface, 176
removeMenuListener( ) (JMenu), 466
removeNodeFromParent( ) (DefaultTreeModel), 577
removePopupMenuListener( )
JComboBox class, 205
JPopupMenu, 456
removePropertyChangeListener( )
AbstractAction class, 45
AccessibleContext class, 976-977
Action interface, 44
Component class, 76
PropertyChangeListener class, 608
SwingPropertyChangeSupport class, 1101
TableColumn class, 500
TreeSelectionModel interface, 606
UIDefaults class, 1020
UIManager class, 1031
removeRange( ) (DefaultListModel), 169
removeRedundantState( ) (StateEdit), 670
removeResourceBundle( ) (UIDefaults), 1021
removeRow( ) (DefaultTableModel), 514
removeRowSelectionInterval( ) (JTable), 498, 525
removeSelectionInterval( )
JList class, 190
JTree class, 590
ListSelectionModel interface, 175
removeSelectionPath( )
JTree class, 590
TreeSelectionModel interface, 607
removeSelectionPaths( )
JTree class, 590
TreeSelectionModel interface, 607
removeSelectionRow( ) (JTree), 590
removeSelectionRows( ) (JTree), 590
removeStyle( )
JTextPane class, 765
StyleContext class, 784
StyledDocument interface, 812, 816
removeTabAt( ) (JTabbedPane), 338
removeTableModelListener( )
AbstractTableModel class, 511
TableModel interface, 508
removeTopLevelWindowListener( ) (EventQueueMonitor), 999, 1002
removeTreeExpansionListener( ) (JTree), 586
removeTreeModelListener( )
DefaultTreeModel class, 575
TreeModel interface, 573
removeTreeSelectionListener( )
DefaultTreeSelectionModel class, 608
JTree class, 586
TreeSelectionModel interface, 606
removeTreeWillExpandListener( ) (JTree), 586
removeUndoableEditListener( )
AbstractDocument class, 804
Document interface, 801
UndoableEditSupport class, 674
removeUpdate( )
DocumentListener interface, 819
View class, 840
removeVetoableChangeListener( ) (Component), 76
render( )
AbstractDocument class, 807
Document interface, 802
Renderer interface, 1088
rendering
examples of, 549-553, 622
list data, 163, 182-185, 1087
nodes, 616-618
table data, 530-538, 549-556
trees, 616-631
CellRendererPane class, 1087
reorderingAllowed property (JTableHeader), 526
repaint( ), 1145, 1149
DefaultCaret class, 740
JComponent class, 61, 78, 1130
JViewport class, 332
repainting (see painting components)
RepaintManager class, 61, 1129-1133, 1149
replace( )
AccessibleText interface, 992
DocumentFilter class, 845
DocumentFilter.FilterBypass class, 846
View class, 839
replaceEdit( )
AbstractUndoableEdit class, 640
UndoableEdit interface, 637-638
replacement methods, 763-765
replaceRange( ) (JTextArea), 703
replaceSelection( )
JTextComponent class, 689
JTextPane class, 763
requestDefaultFocus( ) (JComponent), 78
requestFocus( )
AccessibleComponent interface, 985
JComponent class, 71, 78
requestFocusEnabled property (JComponent), 58, 71
rescanCurrentDirectory( ) (JFileChooser), 379
reset( ) (ProgressMonitorInput-Stream), 157
resetChoosableFileFilters( ) (JFileChooser), 379
resetRecognizer( ) (DragGestureRecognizer), 937
resetRowSelection( ) (TreeSelectionModel), 607
resetToPreferredSizes( ) (JSplitPane), 319
reshape( )
JComponent class, 77
JInternalFrame class, 266
reshowDelay property (ToolTipManager), 1085
resizable property
JInternalFrame class, 264
TableColumn class, 500
resizeFrame( )
DefaultDesktopManager class, 274
DesktopManager interface, 273, 280
resizeWeight property
JSplitPane class, 317
View class, 836
resizing (see size)
resizingAllowed property (JTableHeader), 526
resizingColumn property (JTableHeader), 526
resolveParent property
AttributeSet interface, 768
Keymap interface, 755
MutableAttributeSet interface, 770
SimpleAttributeSet class, 772
ResourceModExample.java (example), 1044
resources for further reading
AWT classes, 53
database programming, 523
image manipulation, 1088
Java, xiv
key bindings, 73
layout managers, 343
listener interfaces, 76
Mac OS X, Java runtime properties for, 1011
XML, 579, 880
restart( ) (Timer), 1084
restoreState property (StateEditable), 666
restoreSubcomponentFocus( ) (JInternal Frame), 266
revalidate( ) (JComponent), 78, 237, 1130
RevalidateExample.java (example), 237
revalidating containers, 237
rightComponent property (JSplitPane), 317
rigid spaces, 341
rollover, adding to buttons, 119
rollover property (ButtonModel), 103
rolloverEnabled property (AbstractButton), 109
rolloverIcon property (AbstractButton), 108
rolloverSelectedIcon property (AbstractButton), 108
RolloverSpinnerListModel.java (example), 217
root, 570
(see also trees)
root container, 71
root directories, 388, 567
root pane, 228-246
border/window controls, setting from, 237
JRootPane class, 229-231
sample code for, 229, 231
(see also layers)
root property
DefaultTreeModel class, 574
TreeModel interface, 573
rootElement property (AbstractDocument), 804
rootElements property (Document), 800
rootFrame property (JOptionPane), 292
rootPane property
JApplet class, 258
JComponent class, 58, 63
JFrame class, 248
JInternalFrame class, 263
JWindow class, 253
RootPaneContainer interface, 228-229, 238
implementations of, 246-258
rootVisible property (JTree), 585
row headers, 327, 540-543
rowAtPoint( ) (JTable), 498
rowCount property
JTable class, 492
TableModel interface, 507
rowHeader property (ScrollPaneLayout), 330
rowHeaderModel class, 543
RowHeaderTable.java (example), 541
rowHeaderView property (JScrollPane), 324
rowHeight property
JTable class, 492
JTree class, 585
RowMapper interface, 605
rowMapper property (TreeSelectionModel), 605
rowMargin property (JTable), 494
rows, 571
path and row methods for, 591
vs. paths, 604
(see also tables)
rows property (JTextArea), 701
rowSelected property (JTree), 585
rowSelectionAllowed property (JTable), 492
rowsRemoved( ) (DefaultTableModel), 513
RTF, javax.swing.text.rtf package for, 11
run( ) (Update), 154
running property (Timer), 1082
S[ Top ]
sample code, xix
accessibility, 993-995, 1003-1006
actions, 46-47
alignment, 88
applets, 98, 254, 255
autoscrolling, 963
borders, 414
custom, 429, 1066
matte, 421
titled, 425
bounded ranges, 136-138
boxes, 346
buttons, 113, 363
adding images to, 26-28
fancy, 119
grouped, 129
toggle, 121
carets, 741, 743
census form, 321, 325
checkboxes, 471-472
color chooser dialogs, 389, 396-400
combo boxes, 198-200, 207
containers, validating/revalidating, 237
database data, 521-525, 537
desktop environment simulation, 281-285
dialogs, 290-291
document content, restricting length of, 810
Drag and Drop, 929-932, 940, 950-960
editor kits, 891
editors, 626-631
event handling, 30, 141
event listeners, for buttons, 114
Every Event Listener (EEL), 610
file chooser dialogs, 367-370, 373-375
filters, 382
focus, 1106, 1113-1116
formatters, 729, 731
frames, closing/exiting program, 249-251
glass pane blocking mouse events, 233-235
glue components, 340
highlighters, 747, 750
HTML browsers, 849-851, 881-883
icon factory, 1063
icons, 95, 385-387
for trees, 617-618
input stream progress monitoring, 157
internal frames, 32-34
dialogs for, 311
iconifying/deiconifying, 279
jog shuttle component, 1142, 1146-1153
keymaps, 757
labels, 85, 90, 95, 1090
layered pane, 239
layout managers, 349-352, 357-359
L&F, 1029, 1038-1046, 1056
Metal L&F, 1052-1054
list selections, 180
listeners, 24, 884
lists, 159, 192
list data, adding/removing, 169-170
list selections, 178
menu items, 445, 479-481
menus, 434-436, 466
popup, 459-460
mnemonics, 87
models for components, 1137, 1140
multithreading, 1120-1122
nodes, 577-579
numbers, combination formatter for, 719-721
panes, 229-231
tabbed, 335, 344-345
parentheses/brackets/braces, 816-819
pie charts, 558-566
progress monitor dialog, 154
radio buttons, 474
renderers, 183, 531
custom, 550-553, 622
rollover lists, 217
row headers, 541
scrollpanes, 320-321, 325
separators, 477
sliders, 147
spinners, 211, 217
editors for, 218, 223
splash screens, 251
split panes, 314-316
springs and struts, 342, 358, 364
styles, 786-793
tabbed panes, 333
table columns, 505, 506
table data, 509-511
dynamic, 517-521
editing/rendering, 550-556
paging, 544-549
selecting, 527-530
tables, 489, 494
tabs, 796
text editors, 864-868, 875-877, 878-880
text fields, 691, 695
formatted, 708-710
text, line transformation for, 704
timed events, 1084
toolbars, 21, 23, 28, 486-487
transfer handlers, 915-918
transparency, 226
trees, 568, 588
displaying XML documents, 579-582
UI delegates, 1069-1074
undo functionality, 640-680, 828-830
uppercase/lowecase, 846
warning messages, suppressing, 256
web-site manager application, 34-40
sample desktop, 275-285
SampleDesktop.java (example), 276, 281-285
SampleDesktopMgr.java (example), 277, 279, 283
SampleUndoableEdit.java (example), 661
Scrollable interface, 190, 326-327
scrollable tables, 540-543
paging for, 543-549
scrollableTracksViewportHeight property
JList class, 188
JTable class, 493
JTextComponent class, 687
JTree class, 584
scrollableTracksViewportWidth property
JEditorPane class, 852
JList class, 188
JTable class, 493
JTextArea class, 702
JTextComponent class, 687
JTree class, 584
ScrollBar class, 327
ScrollBarExample.java (example), 141
scrollbars, 14, 132, 138-142
bounded-range, 133
in combo boxes, 202
corner components and, 326
creating, 324
event handling for, 141
horizontal or vertical orientation for, 138
JTextArea class and, 700
modifying, 1051-1053
scrollpanes and, 320, 327
vs. sliders, 142
"smart", 327
text components and, 684
scrolling, 314, 326
autoscrolling and, 63, 962-965
examples of, 320-321
horizontal/vertical, disabling, 327
JList class and, 185
JScrollPane class, 320-332
heavyweight components in, 1127
ScrollDemo.java (example), 321
ScrollList.java (example), 320
JViewport class, 330-332
large tables, paging for, 543-549
list selections and, 190
Scrollable interface, 326-327
spinners and, 208
ViewportLayout class, 332
ScrollPaneConstants interface, 328
ScrollPaneLayout class, 327-330
properties table for, 329
scrollpanes, 320-330
components of, 327
headers and corners on, 320, 325
horizontal/vertical scrolling in, disabling, 327
trees displayed in, 584
scrollPathToVisible( ) (JTree), 592
scrollRectToVisible( )
JComponent class, 79
JTextField class, 695
JViewport class, 332
scrollRowToVisible( ) (JTree), 592
scrollToReference( ) (JEditorPane), 853
SDK
backward compatibility and, 256
HTML and, 93
property tables and, xxi
Release 1.3
accessibility support and, 972, 990-996
action-supporting methods added since, 111
component actions and, 1170
event listeners and, 166
frame visibility and, 278
keyboard event system introduced with, 755
LEADING/TRAILING constants and, 87
properties added since, 58
Swing changes since, xvi
Release 1.4, xiv, 2
accessibility support and, 970, 990-996
auditory cues and, 1041
auditory feedback and, 1192
component actions and, 1170
custom tags and, 895
Drag and Drop functionality and, 913-918
focus and, 1102
graphics environment and, 49
indeterminate progress added since, 148
painting/repainting and, 1128
popup menus and, 453
printing methods added since, 61
properties added since, 58
spinners introduced with, 208
Swing changes since, xvii
Swing class hierarchy in, 11
support/usability improvements in, 907
SecretLabel.java (example), 1090
SecretTest.java (example), 1091
Segment class, 823-825
properties table for, 824
select( ) (JTextComponent), 689
selectable menu items, 469-482
selectAll( )
ComboBoxEditor interface, 198
JTable class, 499, 525
JTextComponent class, 689
selectAllAccessibleSelection( ) (AccessibleSelection), 986
selected property
AbstractButton class, 109
ButtonModel interface, 103
DefaultSingleSelectionModel class, 438
JInternalFrame class, 264, 266
JMenu class, 463
JMenuBar class, 441
selectedColor property
ColorSelectionModel interface, 390
DefaultColorSelectionModel class, 391
selectedColumn property (JTable), 493
selectedColumnCount property
JTable class, 493
TableColumnModel interface, 501
selectedColumns property
JTable class, 493
TableColumnModel interface, 501
selectedComponent property (JTabbedPane), 334
selectedFile property (JFileChooser), 371
selectedFiles property (JFileChooser), 371
selectedIcon property (AbstractButton), 107
selectedIndex property
DefaultSingleSelectionModel class, 438
JComboBox class, 203
JList class, 188
JTabbedPane class, 334
SingleSelectionModel interface, 437
selectedIndices property (JList), 188
selectedItem property
ComboBoxModel interface, 195
DefaultComboBoxModel class, 196
JComboBox class, 203
selectedObjects property
DefaultButtonModel class, 105
JCheckBoxMenuItem class, 470
JComboBox class, 203
selectedRow property (JTable), 493
selectedRowCount property (JTable), 493
selectedRows property (JTable), 493
selectedText property (JTextComponent), 687
selectedTextColor property (JTextComponent), 686
selectedValue property (JList), 188
selectedValues property (JList), 188
selectInitialValue( ) (JOptionPane), 310
selection dialogs (see chooser dialogs)
selection events, 609
selection lists, 985
selection methods, 589, 607
selection property (ButtonGroup), 128
selectionBackground property
JList class, 187
JTable class, 493
selectionColor property (JTextComponent), 686
selectionCount property (TreeSelectionModel), 605
selectionEmpty property
JList class, 188
JTree class, 585
ListSelectionModel interface, 174
SelectionExample.java (example), 527-530
selectionForeground property
JList class, 187
JTable class, 493
selectionForKey( ) (KeySelectionManager), 202
selectionMode property
JList class, 187
JTable class, 492
ListSelectionModel interface, 174
TreeSelectionModel class, 606
selectionModel property
JColorChooser class, 392
JList class, 187
JTable class, 492
JTree class, 585
TableColumnModel interface, 501
SelectionMonitor.java (example), 180-182
selectionPath property (JTree), 585
selectionPaths property
JTree class, 585
TreeSelectionModel class, 605
selections (see lists, list selections)
selectionValues parameter (JOptionPane), 300
selectionVisible property (Caret), 736
selectText( ) (AccessibleText), 992
selectWithKeyChar( ) (JComboBox), 206
SeparatorExample.java (example), 477
separators, 432, 476-478
serialization, 99
serialization methods, 784
serializing objects, 69
set methods, 19, 1136
property tables and, xx
setProgress( ) (ProgressMonitor), 153
setSelected( ) (ToggleButtonModel), 123
shadow color for borders, 411
shadowColor property (EtchedBorder), 416
shadowInner property (BevelBorder, SoftBevelBorder), 413
shadowOuter property (BevelBorder, SoftBevelBorder), 413
Shape interface, 833
shape method, 343
Shape modelToView( ) (View), 836
sharedInstance( ) (ToopTipManager), 1086
Shift key, for list selections, 161, 185
shiftOffset property (JTextField), 693
shortcuts (see keyboard accelerators; mnemonics)
shouldSelectCell( ) (CellEditor), 534
shouldYieldFocus( ) (InputVerifier), 733
show( )
JInternalFrame class, 266
JPopupMenu class, 454-455, 458
showDialog( )
JColorChooser class, 393
JFileChooser class, 380
showGrid property (JTable), 493
showHorizontalLines property (JTable), 493
showing property
AccessibleComponent interface, 984
JComponent class, 55
showOpenDialog( ) (JFileChooser), 380
showPopup( ) (JComboBox), 205
showSaveDialog( ) (JFileChooser), 380
showsRootHandles property (JTree), 585
showVerticalLines property (JTable), 493
siblings, trees and, 571
significant property
AbstractUndoableEdit class, 639
CompoundEdit class, 645
UndoableEdit interface, 637
SimpleApplet.java (example), 254, 256
SimpleAttributeSet class, 771-774
properties table for, 772
SimpleButtonGroupExample.java (example), 129
SimpleEditor.java (example), 864-869
SimpleFileChooser.java (example), 367-370
SimpleFileFilter.java (example), 382
SimpleFTF.java (example), 708-710
SimpleJLabelExample.java (example), 85
SimpleLayers.java (example), 239
SimpleLinkListener.java (example), 884
SimpleList.java (example), 159-161
SimpleModelInteface.java (example), 1137
SimpleModel.java (example), 1140
SimpleSplitPane.java (example), 314-316
SimpleTable.java (example), 489
SingleSelectionModel interface, 437
properties table for, 438
site frames, creating, 37
SiteFrame class, 36
SiteFrame.java (example), 38
SiteManager.java (example), 35
size
of components, 63-65, 352-354
resizability of custom components, 1143
of split panes, 319
of tables, autosizing, 492
size property
AccessibleComponent interface, 984
DefaultComboBoxModel class, 196
DefaultListModel class, 166
JComponent class, 55, 58, 63
ListModel interface, 164
size( )
ActionMap class, 83
DefaultListModel class, 167
InputMap class, 82
SizeRequirements class, 352-354
sizeWidthToFit( ) (TableColumn), 501
Skeletal Implementation design pattern, 165, 407
Sketch.java (example), 1153
skip( ) (ProgressMonitorInput-Stream), 157
slanted edges (see bevel borders)
SliderExample.java (example), 147
sliders, 132, 138, 142-148
horizontal/vertical orientation for, 144
PlainSliderUI.java (example), 1068, 1074
SliderExample.java (example), 147
vs. standalone scrollbar, 142
"track" on, 145
smallDisplayIcon property (AbstractColorChooserPanel), 394
snapToTicks property (JSlider), 145
SoftBevelBorder class, 410-415
properties table for, 412
SortingColumnModel.java (example), 505
SortTreeModel.java (example), 577-579
sound (see audio)
source code (see sample code)
source property
ListDataEvent class, 171
MenuDragMouseEvent class, 451
MenuKeyEvent class, 452
sourceActions property
DragGestureRecognizer class, 936
DropTargetDragEvent class, 926
DropTargetDropEvent class, 928
TransferHandler class, 933
sourceAsDragGestureRecognizer property (DragGestureEvent), 939
sourceElement property (HyperlinkEvent), 886
spans, 833
SpinnerDateModel, 213
properties table for, 214
SpinnerListModel class, 214
properties table for, 215
SpinnerModel interface, 212
properties table for, 213
SpinnerNumberModel class, 215
properties table for, 216
spinners, 208-224
editors for, 217-224
JSpinner class, 209
models for, 212-217
SpinnerTest.java (example), 211
splash screens, JWindow class for, 251
Splash.java (example), 251
split panes
caution with minimum/preferred size of, 319
custom borders for, 1065
JSplitPane class, 314-320
SimpleSplitPane.java (example), 314-316
SplitPaneBorder class, 1065
Spring class, 360-363
properties table for, 362
Spring max( ) (Spring), 362
Spring minus( ) (Spring), 362
Spring sum( ) (Spring), 362
SpringLayout class, 354-365
SpringLayout.Constraints class, 359
springs and struts, 355, 359-365
start methods, 944
start property (SpinnerDateModel), 213
start( )
JApplet class, 254-257
Timer class, 1084
startDrag( )
DragGestureEvent class, 940
DragSource class, 944
startEditingAtPath( ) (JTree), 593
startIndex property (AccessibleHyperlink), 989
startOffset property
Element interface, 800
Highlight interface, 749
View class, 835
startPosition property
AbstractDocument class, 804
Document interface, 801
state
accessibility and, 978
buttons and, 103, 106
undo functionality and, 651, 666-673
state property (JCheckBoxMenuItem), 469
stateChanged( ) (ChangeListener), 52
StateEdit class, 635, 666-673
properties table for, 668
StateEditable interface, 635, 666
static state, 200
StdOutButtonUI.java (example), 1038
StdOutLookAndFeel.java (example), 1038
stepSize property (SpinnerNumberModel), 216
stop( )
DropTargetAutoScroller class, 966
JApplet class, 254
Timer class, 1084
stopCellEditing( ) (CellEditor), 534
stopEditing( ) (JTree), 593
storeState property (StateEditable), 666
string property (JProgressBar), 150
String toString( ) (ListDataEvent), 172
StringContent class, 826
stringPainted property (JProgressBar), 150
strings
formatting, MaskFormatter class for, 721
painted onto progress bars, 150
StringtoString( )
ListSelectionEvent class, 180
Segment class, 825
stringToValue( )
DateFormatter class, 727
DefaultFormatter class, 718
InternationalFormatter class, 725
JFormattedTextField.AbstractFormatter class, 715
MaskFormatter class, 724
structure methods, 597-601
struts, 341-342, 355, 359-365
style application methods, 811
Style interface, 766, 771
style management methods, 784
style methods, 762
StyleAttributeSet class, 766
StyleBox.java (example), 786-790
StyleConstants class, 766, 774-779
inner classes of, 779
StyleContext class, 766, 779-785
properties table for, 782
styled documents, writing as HTML, 904-906
StyledDocument interface, 810-812
styledDocument property (JTextPane), 760
StyledEditor.java (example), 875-877
StyledEditorKit class, 869-871
properties table for, 870
StyledTextAction class, 871
StyleFrame.java (example), 791-793
styleNames property
DefaultStyledDocument class, 813
StyleContext class, 781
styles, 762, 766
DefaultStyledDocument class, 812-818
editor for (example), 785-793
examples of, 786-790
StyleConstants class, 774-779
StyleContext class, 779-785
StyledDocument interface, 810-812
TabSet class, 795
TabStop class, 793
StyleSheet class, 896
styleSheet property
HTMLDocument class, 894
HTMLEditorKit class, 890
styleSheets property (StyleSheet), 896
subdirectories, 567
subElements property
JMenuBar class, 441
JMenuItem class, 448
submenus, 461
supportedLookAndFeel property (LookAndFeel), 1017
Swing, 1-19
AWT and, 3
mixing with Swing, 1125-1128
class hierarchy of, 11-13
MVC architecture for (see MVC architecture)
packages in (list), 10
Swing Set demonstration, 17
Swing utilities, 1076-1082
swingall.jar file, 22
SwingConstants interface, 1081
SwingEventMonitor class, 1000-1002
swing.properties file, 1030
SwingPropertyChangeSupport class, 1101
swing/swing-1e files, xix
SwingUtilities class, 1077-1081, 1118-1123
synchronization, managing, 1120-1123
syncWithScrollPane( ) (ScrollPaneLayout), 330
system event queue, 256
system L&F, 1028
T[ Top ]
tab property (TabSet), 796
TabableView interface, 843
tabbed panes, 333-339, 344-345
tabs in, 334
tabCount property
JTabbedPane class, 334
TabSet class, 796
TabExample.java (example), 796
TabExpander interface, 842
tabLayoutPolicy property (JTabbedPane), 335
table cells (see cells; tables, data in)
table property (JTableHeader), 526
TableCellEditor class, 534
TableCellEditor interface, 553-556
TableCellRenderer interface, 530, 550
tableChanged( ) (TableModelListener), 516
TableChart.java (example), 559-562
TableChartPopup.java (example), 565
TableColumn class, 499-501
properties table for, 499
TableColumnModel interface, 501-503, 540, 543
properties table for, 502
TableColumnModelEvent class, 504
TableColumnModelListener interface, 505
TableFeature.java, 494
tableHeader property (JTable), 493
TableModel interface, 507
charting data with, 557-566
properties table for, 508
scrollable tables and, 540, 543
TableModelEvent class, 515
TableModelListener interface, 516
tables, 489-538
accessibility and, 992
classes/interfaces for, 490-538
columns, 490-507
ColumnExample.java (example), 506
examples of, 505-506
implementing model for, 505-507
data in, 507-525
charting, 557-566
database records, 521-525
dynamic, 516-521
editing/rendering, 530-538, 549-556
examples of, 509-510, 517-521, 544-547, 558-566
selecting, 526-530
examples of, 489, 494
advanced examples, 539-566
javax.swing.table package for, 11
JTable class, 489, 490-507
JTableHeader class, 525
large, paging for, 543-549
scrollable, 540-543
TableView class, 842
tabPlacement property (JTabbedPane), 334
tabRunCount property (JTabbedPane), 334
tabs, 793-797
InsertTabAction class, 864
TabableView interface, 843
TabExpander interface, 842
TabSet class, 795
TabStop class, 793
TabSet class, 795
properties table for, 796
tabSize property (JTextArea), 702
TabStop class, 793
properties table for, 794
TagAction class, 898
targetActions property
DragSourceDragEvent class, 949
DropTargetContext class, 924
tearOff property (JMenu), caution with, 464
TestOval.java (example), 95
TestTree3.java (example), 617-618
TestTree.java (example), 568
text, 681-911
AccessibleText interface, 986-987
alignment, actions for, 869
carets, 734-746
displayed on buttons, 101, 106, 108
editor kits, 849-880
actions for, 863
building custom, 907-911
DefaultEditorKit class, 858-863
EditorKit class, 854-856
examples of, 864-880
file chooser dialog, customizing in, 372
highlighting, 746-754
adding multiple highlights, 750
example of, 747
HyperlinkEvent class, 886
HyperlinkListener interface, 885
javax.swing.text package for, 11, 681
JEditorPane class, 849-854
registering editor kits, 911
JTextArea class, 700-705
JTextComponent class, 684-690
UI-related properties, 734-759
JTextField class, 691-698
JTextPane class, 760-766
labels for, 84-94
manipulating, methods for, 703
multiple lines of, 700
styles, 762, 766
classes/interfaces for, 774-818
editor for (example), 785-793
Swing components for, 682
text areas, 700-703
routines for, 40
text components, how they work, 706
text fields, 682-684
in combo boxes, 197-204
examples of, 691, 695
formatted, 708-733
restricting input in, 698
text views, 833-842, 910
creating custom, 909
TextAction class, 857
text manipulation methods, 807, 991
text property
AbstractButton class, 108
JTextComponent class, 687
text( ) (AbstractWriter), 902
TextAction class, 857
TextActionExample.java (example), 861
TextComponentSampler.java (example), 682-684
textContents property (AccessibleEditableText), 991
TextForm.java (example), 695
threads (see multithreading)
thumb, for scrollbars, 138
thickness of, 139
ThumbNailFileView.java (example), 385
thumbnails
for file icons, 383
of image files, 372
tick marks for sliders, 142, 145
TileAction.java (example), 277, 279, 284
tiles, 62
tiling frames, 275
TiltedBorderUIResource class, 1027
timed events, 1082-1085
Timer class, 1082-1085
ClockLabel.java (example), 1084
properties table for, 1083
tipText property (JToolTip), 1087
title bar, in dialogs, 299
title buttons, 434
title parameter (JOptionPane), 299
title property
JDialog class, 288
JFrame class, 248
JInternalFrame class, 264
TitledBorder class, 423
titleColor property (TitledBorder), 423
TitledBorder class, 422-425
titleFont property (TitledBorder), 423
titleJustification property (TitledBorder), 423
titlePosition property (TitledBorder), 423
toArray( )
AccessibleStateSet class, 980
DefaultListModel class, 168
DragGestureEvent class, 939
toBack( ) (JInternalFrame), 265
toFront( ) (JInternalFrame), 266
toggle buttons, 120-124
custom borders for, 1065
toggle edits, 640-644
ToggleButtonBorder class, 1065
ToggleButtonModel class, 123
properties table for, 124
toggleClickCount property (JTree), 583
toggling undo, examples of, 640-644, 658-660
tokenThreshold property (HTMLDocument), 893
ToolBarExample.java (example), 486-487
toolbars, 432, 482-488
actions, creating for, 45-47
BoxLayout class for creating, 339
examples of, 21, 23, 28
tools (see utilities)
ToolTipManager class, 66, 1085
properties table for, 1086
tooltips, 66, 1085-1087
for buttons in file chooser dialogs, 372
for nodes, 620-623
for tabbed panes, 338
toolTipText property (JComponent), 58, 66
toolTipTextAt property (JTabbedPane), 335
topComponent property (JSplitPane), 317
top-level menus, 461
topLevelAncestor property (JComponent), 58, 63
topLevelMenu property (JMenu), 463
topLevelWindowCreated( ) (TopLevelWindowListener), 1002
topLevelWindowDestroyed( ) (TopLevelWindowListener), 1002
TopLevelWindowListener interface, 1002
totalColumnWidth property (TableColumnModel), 501
toViewCoordinates( ) (JViewport), 332
transfer data method, 927-928
transfer handlers, examples of, 915-918, 952-955
transferable property (DropTargetContext), 924
transferableFlavorsChanged( ) (DragSourceContext), 947
TransferHandler class, 932
transferHandler property, 914
JComponent class, 58
translation methods, 837
transparency, 61
checkboxes and, 127
double buffering and, 68
menu item images and, 446
OpaqueExample.java (example), 226
radio buttons and, 127
traversing focus, 70-72
tree cells, editing
methods for, 592
properties for, 583
tree management methods, 839
TreeCellEditor interface, 624
methods for, 626-631
TreeCellRenderer interface, 621-623
treeCollapsed( ) (TreeExpansionEvent), 615
TreeDragSource.java (example), 956
TreeDropTarget.java (example), 958
TreeEvents.java (example), 610
treeExpanded( ) (TreeExpansionEvent), 615
TreeExpansionEvent class, 614
TreeExpansionListener interface, 615
treeExpansionListeners property (JTree), 585
TreeModel interface, 573
TreeModelEvent class, 573, 611
properties table for, 612
TreeNode interface, 593
properties table for, 594
treeNodesChanged( ) (TreeModelEvent), 612
treeNodesInserted( ) (TreeModelEvent), 612
treeNodesRemoved( ) (TreeModelEvent), 612
TreePath class, 602-604
properties table for, 603
treePath property (TreeModelEvent), 611
trees, 567-632
AbstractLayoutCache class, 631
event handling, 573, 609-615
examples of, 568, 588
expansion methods for, 590
expression tree model (example), 622, 628
icons for, 616-618, 620
javax.swing.tree package for, 11
JTree class, 579-593
models for, 572-579
nodes and paths, 593-604
rearranging via Drag and Drop, 952-960
rendering/editing, 616-631, 1087
terminology for, 570-572
tree selections, 604-609
properties for, 585
selection methods for, 589
VariableHeightLayoutCache class, 631
TreeSelectionEvent class, 613
TreeSelectionListener interface, 614
treeSelectionListeners property (JTree), 585
TreeSelectionModel interface, 605-607
properties table for, 605
treeStructureChanged( ) (TreeModelEvent), 612
treeWillCollapse( ) (TreeWillExpandListener), 615
treeWillExpand( ) (TreeWillExpandListener), 615
TreeWillExpandListener interface, 615
treeWillExpandListeners property (JTree), 585
trigger event list methods, 937
trigger events, popup menus and, 453
triggerEvent property
DragGestureEvent class, 939
DragGestureRecognizer class, 936
trimEdits( ) (UndoManager), 656
trimForLimit( ) (UndoManager), 656
trimToSize( ) (DefaultListModel), 167
type property
DocumentEvent interface, 820
ListDataEvent class, 171
TableModelEvent class, 515
U[ Top ]
UberHandler.java (example), 915-918
UI delegates, 15, 59, 1134, 1141-1143
examples of, 1142, 1150-1152
individual
creating, 1068-1074
replacing, 1051-1054
L&F, changing for, 1033
UI property
JInternalFrame, 264
JOptionPane class, 292
UIClassID constant
JComponent class, 59
JContainer class, 57
UIClassID property
JDesktopPane class, 270
JEditorPane class, 851
JOptionPane class, 292
JTextPane class, 761
UIDefaults class, 1015, 1020-1022, 1044-1045
ActiveValue interface, 1015, 1022
LazyValue interface, 1015, 1023
ResourceModExample.java (example), 1044
UIManager class, 1015, 1027-1034
LookAndFeelInfo class, 1015, 1034
UIManager properties, ProgressMonitor class and, 154
UIManagerDefaults.java (example), 1029
UI managers, largeModel property and, 585
UIResource interface, 1015, 1024-1027
UnderlineAction class, 874
undo, 633-680
AbstractUndoableEdit class, 638-644
compound edits and, 644-650
edit-merging methods and, 637
examples of, 640-680, 828-830
javax.swing.undo package for, 11, 633
killed edits and, 677
nested edits, support for, 675
for sequential edits, 651-666
state and, 651, 666-673
undo( )
AbstractUndoableEdit class, 640
CompoundEdit class, 647
StateEdit class, 669
UndoableEdit interface, 638
UndoManager class, 655
UndoableEdit interface, 634-638
properties table for, 636
UndoableEditEvent class, 634, 650
undoableEditHappened( )
UndoableEditListener interface, 650
UndoManager class, 654
UndoableEditListener interface, 635, 650
undoableEditListeners property (AbstractDocument), 804
UndoableEditSupport class, 635, 673-677
properties table for, 674
UndoableJToggleButton2.java (example), 676
UndoableJToggleButton.java, 657
UndoableToggleApp.java (example), 642-644
UndoableToggleApp2.java (example), 647-650
UndoableToggleApp3.java, 658-660
UndoableToggleApp4.java (example), 670-673
UndoableToggleEdit.java (example), 640
UndoManager class, 635, 651-666
extending, 678-680
properties table for, 654
UndoManagerDetails.java (example), 663-666
undoOrRedo( ) (UndoManager), 656
undoOrRedoPresentationName property (UndoManager), 654
undoPresentation property (CompoundEdit), 645
undoPresentationName property
AbstractUndoableEdit class, 639
UndoableEdit interface, 637
UndoManager class, 654
UndoStyleFrame.java (example), 828-830
undoTo( ) (UndoManager), 656
uninitialize( ) (LookAndFeel), 1018
uninstall( )
JFormattedTextField.AbstractFormatter class, 716
for UI delegates, 1069
uninstallBorder( ) (LookAndFeel), 1019
uninstallChooserPanel( ) (AbstractColor-ChooserPanel), 395
uninstallUI( ) (ComponentUI), 1036
unitIncrement property (JScrollbar), 138
unregisterComponent( ) (ToolTipManager), 1086
unregisterListeners( )
DragGestureRecognizer class, 936
MouseDragGestureRecognizer class, 938
UpcaseFilter.java (example), 846
update methods, 840
update( )
ComponentUI class, 1036
JApplet class, 258
JComponent class, 77
JDialog class, 289
updateChooser( ) (AbstractColorChooser-Panel), 395
updateComponentTreeUI( ) (SwingUtilities), 24, 1081
updateCurrentCursor( ) (DragSourceContext), 947
updateLevel property (UndoableEditSupport), 673
updateLocation( ) (DropTargetAutoScroller), 966
updateTableInRealTime property (JTableHeader), 526
updateUI( )
JCheckBoxMenuItem class, 471
JComboBox class, 205
JComponent class, 59, 79
JDesktopPane class, 271
JInternalFrame class, 266
JList class, 191
JMenu class, 465
JMenuBar class, 443
JMenuItem class, 450
JOptionPane class, 310
JPopupMenu, 458
JRadioButtonMenuItem class, 474
JSeparator class, 477
JSlider class, 147
JTextComponent class, 690
JToolBar class, 485
upFocusCycle( ) (KeyboardFocusManager), 1110
upgrading applications, 20-30
URL property (HyperlinkEvent), 886
URLs
accessibility user classes, 996
accessible applications, developing in Java, 968
Java Developer Connection, 1008
Java home page, 1
Java Plug-in, 256
this book, 53
user input, validating, 626
user interaction with dialogs, 303-305
user interface, auditory cues and, 1041-1043
user interface controllers, 13
user interface methods, 258
userAction property (DragSourceDragEvent), 949
userObject property (MutableTreeNode), 595
utilities
Every Event Listener, 48
Mapper.java, 1170
oraswing.jar, xix
SpringLayout class as aid for, 355
Utilities class, 843-845
utility methods, 775
V[ Top ]
valid property
AccessibilityHyperlink class, 989
JComponent class, 55
validate( ) (JComponent), 56
validateInvalidComponents( ) (RepaintManager), 1132
validateRoot property
JComponent class, 58, 63
JRootPane class, 237
JScrollPane class, 323
JTextField class, 693
validating/revalidating containers, 237
validCharacters property (MaskFormatter), 723
value property
BoundedRangeModel interface, 133
JFormattedTextField class, 713
JProgressBar class, 149
JScrollBar class, 139
JSlider class, 145
JSpinner class, 209
valueChanged( )
DefaultTableColumnModel class, 504
ListSelectionListener interface, 180
SiteFrame.java (example), 38
TreeSelectionListener interface, 614
valueClass property (DefaultFormatter), 718
valueContainsLiteralCharacters property (MaskFormatter), 723
valueForPathChanged( )
DefaultTreeModel class, 576
TreeModel interface, 574
valueIsAdjusting property
BoundedRangeModel class, 134
DefaultListSelectionModel class, 176
JList class, 188
JScrollBar class, 139
JSlider class, 145
ListSelectionModel interface, 174
valueToString( )
InternationalFormatter class, 725
MaskFormatter class, 724
valueToValue( )
DefaultFormatter class, 718
JFormattedTextField.AbstractFormatter class, 715
VariableHeightLayoutCache class, 631
Vector class, 166
verify( ) (InputVerifier), 732
verifyInputWhenFocusTarget property (JComponent), 58
vertical scrollbars, 328
verticalAlignment property
AbstractButton class, 108
JLabel class, 86
verticalScrollBarPolicy property (JScrollPane), 323
verticalTextPosition property (JLabel), 87
vetoable changes, JInternalFrame class and, 264
VetoableChangeListener interface, 76, 278
VetoableChangeListener list, 1111
VetoablePropertyChangeEvent events, 75
View class, 833-840
hierarchy of, 840
properties table for, 834
view coordinates, 835
view property (JViewport), 330
viewable rectangles, placed over components, 330
viewCount property (View), 835
ViewFactory interface, 833, 910
viewFactory property
DefaultEditorKit class, 858
EditorKit class, 855
HTMLEditorKit class, 890
StyledEditorKit class, 870
View class, 835
viewport dimension methods, 327
viewport property (ScrollPaneLayout), 330
ViewportLayout class, 332
viewports, 327
JViewport class, 330-332
trees and, 584
viewportView property (JScrollPane), 324
viewPosition property (JViewport), 330
views, 13, 330-332, 832-845
AsyncBoxView class, 842
BoxView class, 841
ComponentView class, 841
CompositeView class, 841
creating custom, 909
examples of, 385, 387
FieldView class, 841
FileSystemView class, 388
FileView class, 383-387
FlowView class, 841
GlyphView class, 841
IconView class, 841
LabelView class, 841
ParagraphView class, 841
PasswordView class, 841
PlainView class, 841
TabableView interface, 843
TableView class, 842
View class, 833-840
WrappedPlainView class, 841
ZoneView class, 841
viewSize property (JViewport), 330
viewToModel( )
JTextComponent class, 689
View class, 837
virtual desktop (see desktop environment simulation)
visible nodes, 571
visible property
AccessibleComponent interface, 984
Caret interface, 736
JComponent class, 55, 58
JPopupMenu class, 455
View class, 835
visibleAmount property (JScrollBar), 139
visibleRect property (JComponent), 58, 62
visibleRowCount property (JList), 187
visualRepresentation property (TransferHandler), 933
VK_ KeyEvent constants, 1093
VolumeEditor.java (example), 554-556
Volume.java (example), 550
VolumeRenderer.java (example), 553
voting, buttons for (example), 129
W[ Top ]
wallpaper, 276
wantsInput property (JOptionPane), 292
warning messages, applets and, 256
warningString property (JInternalFrame), 264
wasIcon( ) (DefaultDesktopManager), 275
web browsers, JApplet class and, 254-257
web sites (see URLs)
web-site manager sample application, 34-40
wheelScrollingEnabled property (JScrollPane), 323
when property
MenuDragMouseEvent class, 451
MenuKeyEvent class, 452
width property (JComponent), 58
windowClosing( ) events, 248
WindowConstants interface, 246
windowDecorationStyle property (JRootPane), 237
windowForComponent( ) (SwingUtilities), 1081
windows, 251-254
borderless frame and, 267
closing, JDialog class for, 287
desktop environment simulation and, 259
JWindow class, 251-254
Splash.java (example), 251
TopLevelWindowListener interface, 1002
WindowConstants interface, 246
WrappedPlainView class, 841
wrapStyleWord property (JTextArea), 702
write( )
AbstractWriter class, 902
DefaultEditorKit class, 863
EditorKit class, 856
HTMLEditorKit class, 891
HTMLWriter class, 904
JTextComponent class, 690
writeAttributes( )
AbstractWriter class, 903
StyleContext class, 785
writeAttributeSet( ) (StyleContext), 785
writeLock( ) (AbstractDocument), 806
writeObject( )
ImageIcon class, 100
ObjectOutputStream class, 69
writeUnlock( ) (AbstractDocument), 806
writing methods, 904, 906
X[ Top ]
x property
JComponent class, 58
MenuDragMouseEvent class, 451
XML, custom tags and, 880
XML documents, tree displaying, 579-582
Y[ Top ]
y property
JComponent class, 58
MenuDragMouseEvent class, 451
Z[ Top ]
ZoneView class, 841
z-order, 17, 1124
Zurück zu Java Swing