Index computer

Chia sẻ: Thanh Cong | Ngày: | Loại File: PDF | Số trang:24

0
42
lượt xem
1
download

Index computer

Mô tả tài liệu
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Index A ABORT constant, 411 ABORTED constant, 61 abortGrabbing( ), 448 action( ), 96 Button component, 194 Checkbox component, 353 Choice component, 335 Component class, 181 List component, 345 MenuItem class, 368 TextField class, 315 ACTION_ constants, 141 ACTION_EVENT event, 112 action keys, 137 ActionEvent class, 141, 831 ActionListener( ), 154 ActionListener interface, 147, 834 actionPer formed( ), 112, 147 activeCaption color, 89 activeCaptionBorder color, 89 activeCaptionText color, 89 adapter classes, 119 add( ), 47 add listener interfaces, 121, 155 Choice component, 333 Component class, 178 Container class, 209-210 List component, 340 Menu class, 371 MenuBar class, 377 addActionListener( ), 196 List...

Chủ đề:
Lưu

Nội dung Text: Index computer

  1. Index A List component, 348 ABORT constant, 411 MenuItem class, 368 ABORTED constant, 61 TextField class, 317 abortGrabbing( ), 448 addAdjustmentListener( ) action( ), 96 Adjustable interface, 401 Button component, 194 Scrollbar class, 393 Checkbox component, 353 addComponentListener( ), 185 Choice component, 335 addConsumer( ) Component class, 181 FilteredImageSource class, 424 List component, 345 ImageProducer interface, 422 MenuItem class, 368 MemoryImageSource class, 427 TextField class, 315 addContainerListener( ), 214 ACTION_ constants, 141 addFocusListener( ), 186 ACTION_EVENT event, 112 addImage( ), 62 action keys, 137 addImpl( ) ActionEvent class, 141, 831 Container class, 210 ActionListener( ), 154 ScrollPane container, 403 ActionListener interface, 147, 834 addInternal( ), 156 actionPer formed( ), 112, 147 addItemListener( ) activeCaption color, 89 Checkbox component, 355 activeCaptionBorder color, 89 Choice component, 336 activeCaptionText color, 89 List component, 347 adapter classes, 119 Menu class, 375 add( ), 47 addItem( ) add listener interfaces, 121, 155 Choice component, 333 Choice component, 333 List component, 340 Component class, 178 addKeyListener( ), 186 Container class, 209-210 addLayoutComponent( ) List component, 340 BorderLayout layout, 259, 261 Menu class, 371 CardLayout layout, 267-268 MenuBar class, 377 FlowLayout layout, 256 addActionListener( ), 196 GridBagLayout layout, 275 1021
  2. 1022 INDEX addLayoutComponent( ) (continued) GridBagLayout layout for, 13, 271-277, GridLayout layout, 264 694 HorizBagLayout layout, 295 GridLayout layout for, 11, 262-266, 701 LayoutManager interface, 251, 286 labels, 190 LayoutManager2 interface, 252 layout managers and (see under specific VerticalBagLayout layout, 296 layout manager) addMouseListener( ), 186 VariableGridLayout layout for, 297-300 addMouseMotionListener( ), 186 ALLBITS constant, 411 addNotify( ) allowsMultipleMode( ), 342 Button component, 193 alpha component, pixel, 415, 417, 420 Canvas class, 200 Alt key (see modifiers) Checkbox component, 352 ALT parameter ( tag), 996 CheckboxMenuItem class, 374 anchor variable (GridBagContraints class), Choice component, 334 278 Container class, 174, 217 animation, 56-58 Dialog class, 237 MemoryImageSource class for, 427-429, FileDialog class, 244 431-433 Frame class, 230 append( ), 322 Label component, 191 appendText( ), 322 List component, 344 Applet( ), 476 Menu class, 372 appletResize( ), 488 MenuBar class, 378 applets, 19, 475-483 MenuItem class, 367 Applet class, 476-483, 527 Panel class, 219 tag (HTML), 995-998 PopupMenu class, 384 AppletContext interface, 485-487, 531 Scrollbar class, 390 AppletStub interface, 487-488, 533 ScrollPane container, 405 audio and, 481-483 TextArea class, 324 (see also audio) TextField class, 315 arcHeight, arcWidth parameters, 29 Window class, 225 ARCHIVES parameter addPoint( ), 51 tag, 996 addSeparator( ), 371 tag, 998 addTextListener( ), 310 arcs, 32 addWindowListener( ), 226 AreaAveragingScaleFilter class, 37, 468, 901 Adjustable interface, 399-401, 553 ascent, font, 74 ADJUSTMENT_ constants, 143 audio, 488-493 AdjustmentEvent( ), 144 applets and, 481-483 AdjustmentEvent class, 143, 835 AudioClip interface, 483-485, 535 AdjustmentListener interface, 147, 838 AudioData class, 488 adjustmentValueChanged( ), 109, 148 AudioDataStream class, 490 alignment AudioPlayer class, 491 ALIGN parameter ( tag), 996 AudioStream class, 489 BorderLayout vs. GridBagLayout, 271 AudioStreamSequence class, 491 centering text (example), 77 beep( ), 503 Component class constants, 162 ContinuousAudioDataStream class, 490 of components, 169 AWT container components, 213 versions of, 2 of containers, 253 AWT, versions of, xiii AWTError error, 473-474, 536
  3. INDEX 1023 AWTEvent( ), 125 Canvas( ), 200 AWTEvent class, 118-159, 537 Canvas class, 9, 199, 565 constants of, 124 CanvasPeer interface, 952 AWTEventMulticaster( ), 154 captions, colors for, 89-90 AWTEventMulticaster class, 153-159, 541 CardLayout( ), 267 AWTException exception, 471, 553 CardLayout layout, 12, 266-271, 566 carets, 307 B cascading filters, 469 CENTER_ALIGNMENT constant, 163 background colors, 89, 164 centering (see alignment) highlighted text, 91 chains, listener (see AWTEventMulticaster images, 37 class) windows, 91 CHAR_UNDEFINED constant, 135 beep( ), 503 characters, 23 BITFTP, obtaining examples by, xix drawing, 23 BLOCK_ constants, 143 echoing, 314 blue (color), 82-83, 415, 417-418, 421 width of, 76-78 blurring filter (example), 456-459 (see also strings) BOLD constant, 68 charsWidth( ), 78 BorderLayout( ), 259 charWidth( ), 76 BorderLayout layout, 12, 257-262, 557 checkAll( ), 64 borders Checkbox( ), 350 caption, color of, 89-90 checkboxes inset, 220 Checkbox component, 4, 349-355, 571 windows, color of, 91 checkbox events, 352-355 BOTTOM_ALIGNMENT constant, 163 checkbox menu events, 374-375 bounds( ), 167 CheckboxGroup class, 4, 356-357, 576 brighter( ), 83 CheckboxMenuItem class, 373-375, 578 browsers, xx CheckboxMenuItemPeer interface, 952 getting information about, 487-488 state of, 351 status line for, 479, 487 CheckboxGroup( ), 356 buffers (see memory) CheckboxMenuItem( ), 373 buttons, 9 checkID( ), 64 Button class, 9, 192-197, 562 checkImage( ) button events, 194-197 ImageObserver inter face, 173 button mask constants, 133 Toolkit class, 500 ButtonPeer interface, 951 Choice( ), 332 ImageButton class, 9 Choice component, 5, 331-338, 580 keyboard events and, 195 ChoicePeer interface, 954 mouse (see mouse events) circles (see ovals) raised rectangles for, 30 classes, 50 ByteArrayImageSource class, 1015 adapter, 119 bytesWidth( ), 78 AWTEvent class, 118-159 (see also under specific class name) C clear( ), 340 CAB files, 998 clearRect( ), 24 CABBASE parameter name ( clickCount variable, 102 tag), 998 calculator example, 197
  4. 1024 INDEX clicking mouse buttons (see mouse events) Component( ), 163 Clipboard( ), 507 COMPONENT_ constants, 126-127 clipboards, xv, 19, 499, 510-512 ComponentAdapter interface, 148, 838 Clipboard class, 507-508, 819 componentAdded( ), 149 ClipboardOwner interface, 506, 821 ComponentEvent( ), 126 StringSelection class, 508, 825 ComponentEvent class, 126, 840 clipping area, 24-26 componentHidden( ), 148 clipRect( ), 24 ComponentListener interface, 148, 842 clone( ) componentMoved( ), 108, 148 GridBagConstraints class, 282 componentRemoved( ), 149 ImageFilter class, 455 componentResized( ), 148 Insets class, 220 components, 3, 162-189, 207 CODE parameter ( tag), 997 CardLayout layout for, 12, 266-271, 566 CODEBASE parameter ( tag), Component class, 162-189, 592 997 ComponentPeer interface, 955 Color( ), 82 designing, 200-204 ColorModel( ), 414 handling events in, 187-189 colors, 80-94, 470 padding around, 281 background, 89, 164 peers for (see peers) highlighted text, 91 state of, 174-177 images, 37 (see also containers) windows, 91 componentShown( ), 148 caption, 89-90 constants, 53 Color class, 81-87, 585 alignment, 162 ColorModel class, 413-421, 903 AWTEvent class, 124 DirectColorModel class, 416, 908 cursor shapes, 205 foreground, 24, 164 for each keyboard key, 134 IndexColorModel class, 418-421, 926 Event class, 104-113 menus and, 90 for cursor shapes, 227 pop-up help and, 90 predefined colors, 81, 87-91, 94 predefined, 81, 87-91, 94 (see also under specific constant name) SystemColor class, 87-92, 783 consume( ) XOR mode and, 26 AWTEvent class, 125 (see also images) InputEvent class, 134 columns (see alignment) Container( ), 208 columnWeights[ ] variable, 274 CONTAINER_ constants, 127 columnWidths[ ] variable, 274 ContainerEvent( ), 127 comparing containers, 13-17, 50, 207-218 colors, 87 Container class, 207-218, 620 dimensional sizes, 43 ContainerAdapter interface, 148, 843 fonts, 72 ContainerEvent class, 127, 844 insets, 220 ContainerListener interface, 148, 847 menu shortcuts, 365 ContainerPeer interface, 962 MIME types, 504 (see also components; under specific points, 42 container) rectangles, 50 contains( ) COMPLETE constant, 61 Container class, 169 COMPLETESCANLINES constant, 435 Polygon class, 51 compList program, 1009-1012 Rectangle class, 48
  5. INDEX 1025 contains( ) (continued) DataFlavor( ), 503 content types, 502-505, 822 date (see time and date) ContinuousAudioDataStream class, 490 debugging by overriding event handlers, control color, 89 101 Control key (see modifiers) decode( ) controlDkShadow color, 89 Color class, 85 controlDown( ), 114 Font class, 72 controlHighlight color, 89 de-emphasizing with color, 83, 89, 92 controlLtHighlight color, 89 delegation model for event handling, controlShadow color, 89 117-159 controlText color, 90 deleteMenuShortcut( ), 367 converting deleteShortcut( ), 378 colors formats (RGB/HSB), 86 deleting, 179 images to pixels, 445-453 applets, 480 coordinates, 19 Graphics objects, 22, 40 coordinate system (see graphics) ImageConsumers (see of events, 103 removeConsumer( )) GridBagLayout components, 279 layout components (see mouse event, 140 removeLayoutComponent( )) (see also points) listener interfaces, 156 copyArea( ), 26 (see also remove . . . Listener( )) CornerLayout layout (example), 287-294 menu shortcuts, 367, 378 corners, rounded, 29 objects from MediaTracker, 62 countComponents( ), 208 peers (see removeNotify( )) countItems( ) (see also remove( ); removeAll( )) Choice component, 332 delItem( ), 341 List component, 339 delItems( ), 341 Menu class, 371 deliverEvent( ), 96 countMenus( ), 377 Component class, 180 create( ), 22 Container class, 214 createImage( ) descent, font, 74 Component class, 36, 172 deselect( ), 342 createImage( ) DESELECTED constant, 145 Toolkit class, 502 desktop colors (see SystemColor class) cropping images, 38 destroy( ), 480 CropImageFilter class, 465, 906 Dialog( ), 235 CTRL key (see modifiers) dialogs, 16, 234-241 Cursor( ), 205 Dialog class, 234-238, 633 cursors DialogPeer interface, 963 components and, 165 for files (see FileDialog class) Cursor class, 205, 630 Dimension( ), 43 Frame class constants for, 227 Dimension class, 42, 637 dimensions (see size) D DirectColorModel( ), 416 DirectColorModel class, 416, 908 darker( ), 83 disable( ) data, 501-512 Container class, 177 DataFlavor class, 502-505, 822 MenuItem class, 367 Transferable interface, 505, 828 (see also clipboards)
  6. 1026 INDEX disableEvents( ) Rectangle class, 50 Component class, 188 ERROR constant, 411 MenuItem class, 369 ERRORED constant, 61 disabling LayoutManager, 284 errors, 63, 473-474 dispatchEvent( ), 362 FileDialog class and Navigator, 242 dispose( ) multimedia, 61 Frame class, 229 when loading images, 65 Graphics class, 40 (see also exceptions) Window class, 224 Event( ), 113 documentation (see help) EventQueue( ), 158 doLayout( ) events, xiv, 18, 95-159 Component class, 169 checkbox, 352-355 Container class, 213 components and, 180-189 ScrollPane container, 403 containers and, 214 double buffering, 58-60 Event class, 101-116, 639 draw3DRect( ), 30 event methods, 113-115 drawArc( ), 32 event multicasters, 153-159, 541 drawBytes( ), 23 event queue, 117, 158, 499, 652 drawChars( ), 23 event triggers, 7 drawImage( ), 36-39 event types, 121 drawing (see graphics) EventQueue class, 117, 158, 652 drawLine( ), 28 FileDialog class and, 112 drawOval( ), 31 focus (see focus events) drawPolygon( ), 33 frames and, 230 drawPolyline( ), 34 handlers, 97, 100 drawRect( ), 29 handling at component level, 187-189 drawRoundRect( ), 29 Java 1.0 model of, 96-101 drawString( ), 23 Java 1.1 model of, 117-159 DynamicFilter class (example), 459 keyboard (see keyboard events) listeners (see listener interfaces) E lists and, 335-338, 344-349 menu, 362, 368-370, 374-375, 380-382 echoCharIsSet( ), 314 mouse (see mouse events) echoing characters, 314 platforms and, 999-1012 enable( ) scrolling (see scrolling, scrolling events) Container class, 177 target of, 96, 103 MenuItem class, 367 TextArea class and, 325-328 enableEvents( ) TextComponent class and, 309-311 Component class, 187 TextField class and, 315-319 MenuItem class, 369 types of, 97 end( ), 517 windows and, 225, 230 equality (see comparing) example programs, obtaining, xvii equals( ) exceptions, 63, 471-473 Color class, 87 MIME content type, 509 of data flavors (MIME types), 505 (see also errors; under specific excep- Dimension class, 43 tion) Font class, 72 Insets class, 220 MenuShortcut class, 365 Point class, 42
  7. INDEX 1027 F Font class, 68-73, 661 family, font, 69 font size, 68, 70 fetching images, 1016 character width, 76-78 FileDialog( ), 242 font height, 74-76 FileDialog class, 16, 241-248, 653 FontMetrics class, 73-80 events for, 112 graphics and, 24 FileDialogPeer interface, 964 FontPeer class, 70 FileImageSource class, 1015 FontX class, 69 fill variable (GridBagContraints class), 278 graphics and, 23 fill3DRect( ), 30 menus and, 361 fillArc( ), 33 style of, 68, 70 fillOval( ), 31 foreground fillPolygon( ), 35 colors, 24 fillRect( ), 29 foreground colors, 164 fillRoundRect( ), 29 Frame( ), 228 FilteredImageSource( ), 424 FRAMEBITS constant, 411 FilteredImageSource class, 423, 911 frames, 15, 227-234 filterIndexColorModel( ), 464 centering text in (example), 77 filtering images, 453-470 Frame class, 227-232, 669 cascading filters, 469 FramePeer interface, 965 filterRGB( ), 464 menubars on, 375-378 filterRGBPixels( ), 464 menus in (see menus) finalize( ) (see also windows) ColorModel class, 416 FTP, obtaining examples by, xvii Graphics class, 40 Ftpmail, obtaining examples by, xviii PrintJob class, 517 first( ), 269 G flavors, data (see data) gap settings flipping images, 38 BorderLayout layout, 259 FlowLayout( ), 254 CardLayout layout, 267 FlowLayout layout, 11, 253-257, 657 FlowLayout layout, 256 flush( ), 55 GridLayout layout, 264 focus garbage collection, 40 components and, 177 getActionCommand( ) focus events, 111, 184, 189 ActionEvent class, 142 FocusEvent class, 128, 849 Button component, 193 listeners for (see listener interfaces) MenuItem class, 368 TextArea class and, 328 getAdjustable( ), 144 TextField class and, 316 getAdjustmentType( ), 144 (see also events) getAlignment( ) FocusAdapter, FocusListener interfaces, FlowLayout layout, 255 149, 848, 851 Label component, 191 FOCUS_ constants, 128 getAlignmentX( ) FocusEvent( ), 129 Component class, 169 focusGained( ), 112, 149 Container class, 213 focusLost( ), 112, 149 getAlignmentY( ) Font( ), 69 Component class, 169 FontMetrics class, 665 Container class, 213 fonts, 67-73, 164
  8. 1028 INDEX getAlpha( ) getColumns( ) ColorModel class, 415 GridLayout layout, 263 DirectColorModel class, 417 TextArea class, 323 IndexColorModel class, 420 TextField class, 313 getAlphaMask( ), 417 getComponent( ) getAlphas( ), 421 ComponentEvent class, 127 getApplet( ), 485 Container class, 208 getAppletContext( ) ContainerEvent class, 128 Applet class, 476 getComponentAt( ) AppletStub interface, 488 Component class, 169 getAppletInfo( ), 478 Container class, 214 getApplets( ), 486 getComponentCount( ), 208 getAscent( ), 75 getComponents( ), 209 getAudioClip( ) getConstraints( ), 276 Applet class, 482 getContainer( ), 128 AppletContext interface, 485 getContents( ), 508 getBackground( ), 164 getCurrent( ), 356 getBlockIncrement( ) getCursorType( ), 230 Adjustable interface, 401 getCursor( ), 165 Scrollbar class, 390 getData( ), 490 getBlue( ) getDefaultCursor( ), 206 Color class, 83 getDefaultToolkit( ), 496 ColorModel class, 415 getDescent( ), 75 DirectColorModel class, 417 getDirectory( ), 243 IndexColorModel class, 421 getDocumentBase( ) getBlueMask( ), 418 Applet class, 477 getBlues( ), 421 AppletStub interface, 487 getBoundingBox( ), 51 getEchoChar( ), 314 getBounds( ) getDecent( ), 75 Component class, 167 getDescent( ), 75 Polygon class, 51 getErrorsAny( ), 65 Rectangle class, 46 getErrorsID( ), 65 Shape class, 44 getFamily( ), 69 getCaretPosition( ), 307 getFilenameFilter( ), 244 getCheckboxGroup( ), 351 getFile( ), 243 getClickCount( ), 141 getFilterInstance( ), 455 getClip( ), 26 getFocusOwner( ), 225 getClipBounds( ), 26 getFont( ) getClipRect( ), 26 Component class, 164 getCodeBase( ) Font class, 71 Applet class, 477 FontMetrics class, 79 AppletStub interface, 488 Graphics class, 23 getColFraction( ), 299 MenuComponent class, 361 getColor( ) MenuContainer interface, 364 Color class, 85 getFontList( ), 497 Graphics class, 24 getFontMetrics( ), 24, 165, 497 getColorModel( ), 165 getForeground( ), 164 PixelGrabber class, 449 getGraphics( ), 165 Toolkit class, 496 Component class, 21
  9. INDEX 1029 getGraphics( ) (continued) MenuItem class, 366 Image class, 55 getLayout( ), 211 PrintJob class, 516 getLayoutAlignmentX( ) getGreen( ) BorderLayout layout, 262 Color class, 83 CardLayout layout, 268 ColorModel class, 415 GridBagLayout layout, 275 DirectColorModel class, 417 LayoutManager2 interface, 253 IndexColorModel class, 420 getLayoutAlignmentY( ) getGreenMask( ), 418 BorderLayout layout, 262 getGreens( ), 421 CardLayout layout, 269 getHAdjustable( ), 404 GridBagLayout layout, 276 getHeight( ), 54 LayoutManager2 interface, 253 FontMetrics class, 75-76 getLayoutDimensions( ), 276 PixelGrabber class, 449 getLayoutOrigin( ), 276 getHelpMenu( ), 378 getLayoutWeights( ), 277 getHgap( ) getLeading( ), 75 BorderLayout layout, 259 getLength( ), 490 CardLayout layout, 267 getLineIncrement( ), 389 FlowLayout layout, 256 getLocale( ), 472 GridLayout layout, 264 Applet class, 479 getHSBColor( ), 86 Component class, 165 getHScrollbarHeight( ), 403 Window class, 224 getHumanPresentableName( ), 504 getLocation( ) getIconImage( ), 228 Component class, 166 getID( ), 125 Point class, 42 getImage( ) Rectangle class, 46 Applet class, 36, 480 getLocationOnScreen( ), 166, 472 Toolkit class, 36 getMapSize( ), 421 getImage( ) getMaxAdvance( ), 78 AppletContext interface, 485 getMaxAscent( ), 75 Toolkit class, 500 getMaxDescent( ), 75 getInsets( ), 217 getMaximum( ) getItem( ) Adjustable interface, 401 AWTEvent class, 145 Scrollbar class, 389 Choice component, 332 getMaximumSize( ) List component, 340 Component class, 168 Menu class, 371 Container class, 212 getItemCount( ) getMenu( ), 377 Choice component, 332 getMenuBar( ), 229 List component, 339 getMenuCount( ), 377 Menu class, 371 getMenuShortcut( ), 366 getItems( ), 340 getMenuShortcutKeyMask( ), 497 getItemSelectable( ), 145 getMimeType( ), 504 getKey( ), 365 getMinimum( ) getKeyChar( ), 136 Adjustable interface, 400 getKeyModifiersText( ), 138 Scrollbar class, 389 getKeyText( ), 137 getMinimumSize( ) getLabel( ), 192 Component class, 168 Checkbox component, 350 Container class, 212
  10. 1030 INDEX getMinimumSize( ) (continued) getRed( ) List component, 343 Color class, 83 TextArea class, 324 ColorModel class, 415 TextField class, 314 DirectColorModel class, 417 getMode( ), 244 IndexColorModel class, 420 getModifiers( ) getRedMask( ), 418 ActionEvent class, 142 getReds( ), 421 InputEvent class, 133 getRepresentationClass( ), 504 getName( ) getRGB( ) Clipboard class, 507 Color class, 83 Component class, 178 ColorModel class, 415 Font class, 69 DirectColorModel class, 417 MenuComponent class, 361 IndexColorModel class, 421 getNextEvent( ), 159 SystemColor class, 92 getOrientation( ) getRGBdefault( ), 415 Adjustable interface, 400 getRowFraction( ), 299 Scrollbar class, 388 getRows( ), 264 getPageDimension( ), 517 List component, 343 getPageIncrement( ), 390 TextArea class, 323 getPageResolution( ), 517 getScaledInstance( ), 53-54 getParameter( ) getScreenResolution( ), 499 Applet class, 477 getScreenSize( ), 499 AppletStub interface, 488 getScrollbarDisplayPolicy( ), 403 getParameterInfo( ), 478 getScrollbarVisibility( ), 324 getParent( ) getScrollPosition( ), 405 Component class, 178 getSelectedCheckbox( ), 356 MenuComponent class, 363 getSelectedIndex( ), 334 getPeer( ) List component, 341 Container class, 173 getSelectedIndexes( ), 341 Font class, 70 getSelectedItem( ) MenuComponent class, 362 Choice component, 333 getPixels( ), 449 List component, 341 getPixelSize( ), 415 getSelectedItems( ) getPoint( ), 140 CheckboxMenuItem class, 374 getPredefinedCursor( ), 206 List component, 341 getPreferredSize( ) getSelectedObjects( ) Component class, 168 Checkbox component, 351 Container class, 212 Choice component, 334 List component, 343 ItemSelectable interface, 357 TextArea class, 323 List component, 342 TextField class, 313 getSelectedText( ), 307 getPrintJob( ) getSelectionEnd( ), 306 PrintGraphics interface, 515 getSelectionStart( ), 306 Toolkit class, 497 getShortcutMenuItem( ), 377 getProperty( ) getSize( ) Image class, 55 Component class, 167 Toolkit class, 498 Dimension class, 43 Font class, 70 Rectangle class, 47
  11. INDEX 1031 getSize( ) (continued) getVScrollbarWidth( ), 404 getSource( ), 54 getWarningString( ), 225 getState( ) getWhen( ), 133 Checkbox component, 351 getWidth( ) CheckboxMenuItem class, 373 Image class, 54 getStateChange( ), 146 PixelGrabber class, 448 getStatus( ), 448 getWidths( ), 78 getStyle( ), 70 getWindow( ), 131 getSystemClipboard( ), 499 getX( ), 140 getSystemEventQueue( ), 499 getY( ), 140 getSystemEventQueueImpl( ), 499 GOT_FOCUS event, 112, 316, 328 getText( ) gotFocus( ) Label component, 190 Component class, 185 TextComponent class, 306 TextArea class, 328 getTitle( ) TextField class and, 317 Dialog class, 235 grabPixels( ), 447 Frame class, 228 graphics, 41 getToolkit( ) animation (see animation) Component class, 164 Canvas class for, 9, 199, 565 Window class, 224 components and, 170-171 getTransferDataFlavors( ) Container class and, 216 DataFlavor class, 506 coordinate space, 39, 41 StringSelection class, 508 double buffering, 58-60 getTransferData( ) Graphics class, 21-40, 675 StringSelection class, 509 images (see images) Transferable interface, 506 multimedia and, 61-66 getTransparentPixel( ), 421 PaintEvent class, 131, 888 getTreeLock( ), 178 printing, 513-515, 760 getType( ), 206 shapes and (see shapes) getUnitIncrement( ) XOR mode, 26 Adjustable interface, 401 (see also points) Scrollbar class, 389 green (color), 82-83, 415, 417-418, 421 getUpdateRect( ), 132 GridBagConstraints( ), 282 getVAdjustable( ), 404 GridBagConstraints class, 689 getValue( ) GridBagLayout( ), 274 Adjustable interface, 400 GridBagLayout layout, 13, 271-277, 694 AdjustmentEvent class, 144 GridBagConstraints class, 277-282 Scrollbar class, 389 gridheight, gridwidth variables (GridBag- getVgap( ) Constraints class), 280 BorderLayout layout, 259 GridLayout( ), 263 CardLayout layout, 267 GridLayout layout, 11, 262-266, 701 FlowLayout layout, 256 grow( ), 47 GridLayout layout, 264 getViewportSize( ), 403 H getVisibleAmount( ) handleEvent( ), 96-100 Adjustable interface, 400 Component class, 180 Scrollbar class, 388 hashCode( ) getVisibleIndex( ), 343 Color class, 87 getVisible( ), 388 Font class, 72
  12. 1032 INDEX hashCode( ) (continued) ImageObserver inter face, 36, 410-413, Point class, 42 922 Rectangle class, 50 ImageProducer interface, 422-433, 924 height (see size) ImageProducer object, 54 HEIGHT parameter ( tag), 997 ImageRepresentation consumer, 1014 help InputStreamImageSource class, 1015 help menus, 378 loading (see loading images) pop-up help colors, 90 MemoryImageSource class, 425-433, 931 resources for further reading, xx modifying, 449 hide( ), 176 multimedia and, 61-66 highlighting with color, 83, 89, 91-92 PixelGrabber class, 445-453 horizontal PPMImageDecoder class (example), alignment (see alignment) 438-445 character width, 76-78 ReplicateScaleFilter class, 467, 943 gaps (see gap settings) RGBImageFilter class, 462-465, 946 HorizBagLayout, 294 scrolling (example), 393-399 scrollbars (see scrolling) size of, 54, 410, 436 size (see size) sources, classes for, 1015 HSB colors, 81, 86 Toolkit class and, 499-502 HSBtoRGB( ), 86 (see also colors; graphics) HSPACE parameter ( tag), 997 imageUpdate( ), 171, 412-413 inactiveCaption color, 90 I inactiveCaptionBorder color, 90 inactiveCaptionText color, 90 IllegalComponentStateException excep- incrementaldraw parameter, 172 tion, 472, 705 IndexColorModel class, 418-421, 926 IMAGEABORTED constant, 435 info color, 90 imageComplete( ), 437 infoText color, 90 ImageFilter class, 455 inheritance, 521 PixelGrabber class, 447 init( ) IMAGEERROR constant, 435 Applet class, 479 images, 35-39, 409-413, 422-453, 470 MediaTracker class, 65 animation with, 56-58 input, 3-7 applets and, 480 Checkbox component, 349-355, 571 AreaAveragingScaleFilter class, 468 CheckboxGroup class, 356-357, 576 components and, 171-173 Choice component, 331-338, 580 converting to pixels, 445-453 dialogs (see dialogs; FileDialog class) cropping, 465 InputEvent class, 132-134, 852 decoders for, 1015 keyboard, 4 double buffering, 58-60 List component, 338-349 DynamicFilter class (example), 459 menus for (see menus) FilteredImageSource class, 423 multiline text (see text, TextArea class) Image class, 52-60, 706, 1014 single-line text (see text, TextField class) image filters, 453-470 text (see text) ImageButton class, 9 insert( ) ImageConsumer interface, 434-453, 913 Choice component, 333 ImageFetcher class, 1016 Menu class, 371 ImageFilter class, 454, 917 TextArea class, 322 inserting text, 307
  13. INDEX 1033 insertSeparator( ), 371 isItalic( ), 70 insets( ), 217 isMetaDown( ), 133 Insets class, 219-221, 709 isMimeTypeEqual( ), 504 inside( ) isModal( ), 236 Container class, 169 isMultipleMode( ), 342 Polygon class, 51 isPlain( ), 70 Rectangle class, 48 isPopupTrigger( ), 141 inter faces, 50 isResizable( ) listeners (see listener interfaces) Dialog class, 236 peer (see peers) Frame classM, 229 (see also under specific interface) isSelected( ), 342 InterruptedException, waiting and, 63 isShiftDown( ), 133 intersection( ), 48 isShowing( ), 175 intersections with rectangles, 48-49 isTearOff( ), 372 intersects( ), 48 isTemporary( ), 129 invalidateLayout( ), 253 isValid( ), 175 BorderLayout layout, 262 isVisible( ), 175 CardLayout layout, 269 ITALIC constant, 68 GridBagLayout layout, 276 ITEM_ constants, 145 invalidate( ) ItemEvent class, 144, 855 Component class, 175 ItemListener interface, 149, 858 Container class, 214 ItemSelectable interface, 357, 711 isActionKey( ), 137 itemStateChanged( ), 111-112, 150 isActive( ) Applet class, 479 J AppletStub interface, 487 JAR files, 998 isAltDown( ), 133 Java isAncestorOf( ), 211 resources for further reading, xx isBold( ), 70 versions of, xiii isConsumed( ) Java 1.0 AWTEvent class, 125 Event class constants, 104 InputEvent class, 134 event handling, 96-101, 117-159 isConsumer( ) mouse buttons in, 115 FilteredImageSource class, 424 JavaBeans, xv ImageProducer interface, 423 MemoryImageSource class, 427 isControlDown( ), 133 K isDataFlavorSupported( ) KEY_ constants, 135 DataFlavor class, 506 KEY_ events, 104, 106, 134 StringSelection class, 509 key text properties, 137 isEditable( ), 308 keyboard events, 100, 106, 189 isEmpty( ), 49 buttons and, 195 isEnabled( ) Checkbox component and, 354 Component class, 176 Choice component and, 335 MenuItem class, 367 constants for each key, 134 isErrorAny( ), 65 Event class constants for, 104 isErrorID( ), 65 key variable, 103 isFocusTraversable( ), 177 KeyAdapter class, 859 isIndexSelected( ), 342 KeyEvent class, 134-139, 860
  14. 1034 INDEX keyboard events (continued) CardLayout layout, 268 KeyListener interface, 878 FlowLayout layout, 257 KeyListener, KeyAdapter interfaces, 150 GridLayout layout, 266, 275 List component and, 346 HorizBagLayout layout, 295 listeners for (see listener interfaces) LayoutManager interface, 287 modifiers for, 103, 105, 113, 132-133, OrientableFlowLayout layout, 302 137, 365 VariableGridLayout layout, 299 key modifier text properties, 138 VerticalBagLayout layout, 297 TextArea class and, 326 layouts, 10-13, 249-253, 302 TextField class and, 315-316 BorderLayout, 12, 257-262, 557 (see also events; events) CardLayout, 12, 266-271, 566 keyboard input, 4 combining, 282 keyboard shortcuts, 364-365, 377 containers and, 211-214 keyDown( ) CornerLayout (example), 287-294 Button component, 195 designing, 285-294 Checkbox component, 354 disabling LayoutManager, 284 Choice component and, 335 FlowLayout, 11, 253-257, 657 Component class, 182 GridBagConstraints class, 277-282, 689 Event class, 106 GridBagLayout, 13, 271-277, 694 List component, 346 GridLayout, 11, 262-266, 701 TextArea class, 326 HorizBagLayout, 294 TextField class, 315 LayoutManager interface, 10, 250-253, keyEvent( ), 136 715 keyPressed( ), 106, 150 LayoutManager2 interface, 252-253, 717 keyReleased( ), 106, 150 OrientableFlowLayout, 300-302 keyTyped( ), 150 scrollbar, 403 keyUp( ) from sun.awt package, 294-302 Button component, 195 VariableGridLayout, 297-300 Checkbox component, 354 VerticalBagLayout, 296 Choice component and, 336 leading, font, 74 Component class, 182 LEFT_ALIGNMENT constant, 163 Event class, 106 LightweightPeer interface, xv, 503, 967 List component, 346 line increment, scrollbars, 389 TextArea class, 327 lines, 28 TextField class, 316 arcs, 32 connecting to form polygons, 34 L width of, 28 list( ) Label( ), 190 Component class, 179 labels Container class, 218 Label component, 3, 189-192, 712 List class, 6, 339 LabelPeer interface, 966 LIST_ events, 347 for menu items, 366 listener interfaces, 118, 147-153 last( ), 269 AWTEventMulticaster class, 153-159, 541 lastPageFirst( ), 517 for checkbox events, 355 layout( ) components and, 185 Component class, 169 containers and, 214 ScrollPane container, 403 for list events, 336-338, 347 layoutContainer( ), 252 for menu events, 374 BorderLayout layout, 260
  15. INDEX 1035 listener interfaces (continued) image data size, 448 for menu item events, 368 MemoryImageSource class, 425-433, 931 for scrolling events, 392 (see also performance) for text events, 310-311, 315, 317-319 Menu( ), 370 TextField class and, 317 MenuBar( ), 376 windows and, 226 MenuComponent( ), 361 lists MenuItem( ), 366 checkboxes (see checkboxes) menus, 7, 359-373, 378-382 List component, 338-349, 719 checkboxes (see checkboxes) list events, 111, 335-338, 344-349 colors of, 90 ListPeer interface, 967 help menus, 378 pop-up, 331-338 Menu class, 370-373, 734 LiveConnect, 997 menu events, 362, 368-370, 374-375, LOADING constant, 61 380-382 loading images, 61-66, 1013-1016 MenuBar class, 375-378, 738 ImageObserver constants for, 411 MenuBarPeer interface, 970 status of (see status, loading) MenuComponent class, 361-363, 741 Locale class, 165 MenuComponentPeer interface, 972 locate( ) MenuContainer interface, 363, 744 Component class, 169 MenuItem class, 365-370, 745 Container class, 214 MenuItemPeer interface, 972 location( ) MenuPeer interface, 973 Component class, 166 MenuShortcut class, 364-365, 750 GridBagLayout layout, 277 pop-up (see pop-up menus) loop( ), 484 MenuShortcut( ), 364 LOST_FOCUS event, 112, 316, 328 menuText color, 90 lostFocus( ) Meta key (see modifiers) Component class, 185 metaDown( ), 114 TextArea class, 328 methods, 50 TextField class and, 317 renaming for Java 1.1, xv, 2 lostOwnership( ) (see also under specific class or method ClipboardOwner interface, 506 name) StringSelection class, 509 MIME content types, 502-505, 822 minimumLayoutSize( ), 251 M BorderLayout layout, 260 CardLayout layout, 268 mail servers, obtaining examples by, xviii FlowLayout layout, 257 makeVisible( ), 343 GridLayout layout, 265, 275 Mandelbrot program (example), 431 HorizBagLayout layout, 295 maxAscent value, 74 LayoutManager interface, 286 maximumLayoutSize( ), 253 OrientableFlowLayout layout, 302 BorderLayout layout, 261 VerticalBagLayout layout, 297 CardLayout layout, 268 minimumSize( ) GridBagLayout layout, 275 Component class, 168 MAYSCRIPT parameter ( tag), Container class, 212 997 List component, 343 MediaTracker class, 61-66 TextArea class, 324 memory, 22 TextField class, 314 color and, 413 modes, FileDialog class, 242 garbage collection, 40
  16. 1036 INDEX modifiers mouseMove( ) action event, 142 Component class, 184 getModifiers( ), 133, 142 Event class, 108 keyboard, 103, 105, 113, 132-133, 137 mouseMoved( ), 108, 152 key modifier text properties, 138 mousePressed( ), 108, 151 mouse button, 105, 113, 133 mouseReleased( ), 108, 151 modifiers, keyboard mouseUp( ) for menu shortcuts, 365 Component class, 184 monitor resolution, 499 Event class, 108 monitor size, 499 move( ) MOUSE_ constants, 139 Component class, 166 mouse events, 100, 108, 189 Point class, 42 buttom modifiers, 113 multiline input (see text, TextArea class) button modifiers, 105, 133 multimedia, 61-66 clickCount variable, 102 MediaTracker class, 61-66, 729 Component class and, 182-184 multithreading (see threads) in Java 1.0, 115 listeners for (see listener interfaces) N MouseAdapter class, 879 names MouseAdapter interfaces, 150 clipboards, 507 MouseEvent class, 139-141, 881 of components, 178 MouseListener interface, 884 of data flavors (MIME types), 504 MouseListener interfaces, 150 of fonts, 69 MouseMotionAdapter class, 886 menu components, 361 MouseMotionAdapter interface, 151 NAME parameter MouseMotionListener class, 887 tag, 997 MouseMotionListener interface, 151 tag, 998 scrollbars and, 392 Netscape Navigator, 2 (see also events; events) FileDialog class and, 242 mouse for text selection, 306-307 newPixels( ), 428 mouseClicked( ), 151 newsgroups, Java-related, xx mouseDown( ) next( ), 269 Component class, 183 nextFocus( ), 178 Event class, 108 normalizeMimeType( ), 504 mouseDrag( ) normalizeMimeTypeParameter( ), 505 Component class, 183 Event class, 109 mouseDragged( ), 109, 152 O mouseEnter( ) OBJECT parameter ( tag), 997 Component class, 183 objects Event class, 109 image (see images) mouseEntered( ), 109, 151 positioning and sizing, 166-170 MouseEvent( ), 140 obtaining source code, xvii mouseExit( ) OffScreenImageSource class, 1015 Component class, 183 OrientableFlowLayout layout, 300-302 Event class, 109 orientHorizontally( ), 302 mouseExited( ), 109, 151 orientVertically( ), 302
  17. INDEX 1037 origin FocusEvent class, 129 coordinate space, 39 Frame class, 230 GridBagLayout layout, 276 ItemEvent class, 146 ovals, 31 KeyEvent class, 138 overriding Label component, 191 action( ) (see action( )) List component, 344 handleEvent( ), 100 Menu class, 372 imageUpdate( ), 412 MenuComponent class, 363 owner, clipboard, 506, 821 MenuItem class, 367 owner, contents, 507 MenuShortcut class, 365 MouseEvent class, 141 P PaintEvent class, 132 Scrollbar class, 391 pack( ), 223 ScrollPane container, 405 padding around components, 281 TextArea class, 324 paging increment, scrollbars, 390 TextComponent class, 309 paint( ) TextEvent class, 146 Canvas class, 200 TextField class, 315 Component class, 21, 170 WindowEvent class, 131 Container class, 216 (see also toString( )) paint mode, 26-28 peekEvent( ), 159 PAINT, PAINT_ constants, 131 peers, 10, 503-506, 951-985 paintAll( ), 170 Container class and, 173 paintComponents( ), 216 Font class and, 70 PaintEvent class, 131, 888 per formance, 22 painting (see graphics) colors and, 414 Panel( ), 219 deleting applets and, 480 panels Graphics objects and, 22 CardLayout layout for, 12, 266-271, 566 MediaTracker and, 62 FlowLayout layout for, 11, 253-257, 657 (see also memory) OrientableFlowLayout layout for, PixelGrabber class, 445-453, 937 300-302 pixels (see images) Panel class, 218, 752 PLAIN constant, 68 PanelPeer interface, 974 platforms tag (HTML), 477, 997 colors and, 81, 414 paramString( ), 131 event handling and, 116 ActionEvent class, 143 events and, 999-1012 AdjustmentEvent class, 144 font ascent and, 74 AWTEvent class, 126 layouts and, 10-13 Button component, 193 modifier keys and, 107 Checkbox component, 352 peer architecture, 10 CheckboxMenuItem class, 374 scrolling events and, 392 Choice component, 334 Toolkit class, 495-503, 805 Component class, 179 play( ) ComponentEvent class, 127 Applet class, 481 Container class, 217 AudioClip interface, 483 ContainerEvent class, 128 points, 19, 42 Dialog class, 237 adding to polygons, 51 Event class, 114 contained in rectangles, 48 FileDialog class, 245
  18. 1038 INDEX points (continued) printComponents( ) Point class, 41-42, 753 Component class, 517 (see also Dimension class; graphics; Container class, 216 coordinates) ScrollPane container, 405 polygons, 33, 50-52 printing, 19, 513-519 Polygon class, 50-52, 756 PrintGraphics interface, 513-515, 760 pop-up lists, 331-338 PrintJob class, 515-517, 761 pop-up menus Toolkit class and, 497 PopupMenu class, xiv, 759 priority, loading multimedia objects, 62 pop-up menus, 7, 382-384 processActionEvent( ), 197 PopupMenu class, 383-384 List component, 348 PopupMenuPeer interface, 975 MenuItem class, 369 portability, 1 TextField class, 318 events and, 116 processAdjustmentEvent( ) positioning objects, 166-170 Scrollbar class, 393 postEvent( ), 98, 159 processComponentEvent( ), 188 Component class, 180 processContainerEvent( ), 216 MenuComponent class, 362 processEvent( ) MenuContainer interface, 364 button component, 197 Window class, 226 Checkbox component, 355 PPMImageDecoder class (example), Choice component, 336 438-445 Component class, 188 predefined colors, 81, 87-91, 94 Container class, 215 preferredLayoutSize( ), 251 List component, 348 BorderLayout layout, 260 Menu class, 375 CardLayout layout, 268 MenuComponent class, 363 FlowLayout layout, 256 MenuItem class, 369 GridLayout layout, 264, 275 Scrollbar class, 393 HorizBagLayout layout, 295 TextComponent class, 311 LayoutManager interface, 286 TextField class, 318 OrientableFlowLayout layout, 301 Window class, 226 VerticalBagLayout layout, 297 processFocusEvent( ), 188 preferredSize( ) processItemEvent( ) Component class, 168 Checkbox component, 355 Container class, 212 Choice component, 337 List component, 343 List component, 348 TextArea class, 323 Menu class, 375 TextField class, 313 processKeyEvent( ), 189 prepareImage( ) processMouseEvent( ), 189 Component class, 173 processMouseMotionEvent( ), 189 Toolkit class, 500 processTextEvent( ), 311 previous( ), 269 processWindowEvent( ), 226 print( ) properties Component class, 171, 517 color, 84-86 Container class, 217 font, 70-72 printAll( ) image, 55 Component class, 171, 517 printing, 498
  19. INDEX 1039 pull-down lists (see pop-up lists; pop-up MenuItem class, 368 menus) TextField class, 318 removeAdjustmentListener( ) Q Adjustable interface, 401 Scrollbar class, 393 queue removeAll( ) event (see events, event queue) Choice component, 333 listener (see AWTEventMulticaster class) Container class, 211 List component, 340 R Menu class, 372 radio buttons, 5 removeComponentListener( ), 186 raised rectangles, 30 removeConsumer( ) RANDOMPIXELORDER constant, 435 FilteredImageSource class, 425 read( ) ImageProducer interface, 423 AudioStream class, 489 MemoryImageSource class, 427 AudioStreamSequence class, 491 removeContainerListener( ), 215 ContinuousAudioDataStream class, 490 removeFocusListener( ), 186 read-only text, 308 removeImage( ), 62 rectangles removeInternal( ), 157 bounding an object, 167 removeItemListener( ) copying, 26 Checkbox component, 355 determining size of, 44 Choice component, 336 as drawing area, 24 List component, 347 drawing, 29 Menu class, 375 filling, 29-30 removeKeyListener( ), 186 intersections with, 48-49 removeLayoutComponent( ) raised (with shadow effect), 30 BorderLayout layout, 260 Rectangle class, 44-50, 763 CardLayout layout, 267 for repainting, 132 FlowLayout layout, 256 with rounded corners, 29 GridLayout layout, 264, 275 size of, 46-49 HorizBagLayout layout, 295 red (color), 82-83, 415, 417-418, 421 LayoutManager interface, 251, 286 redrawrate parameter, 172 VerticalBagLayout layout, 296 RELATIVE constant, 280 removeMouseListener( ), 186 REMAINDER constant, 280 removeMouseMotionListener( ), 187 remove( ) removeNotify( ) AWTEventMulticaster class, 157 Container class, 174, 217 Choice component, 333 List component, 344 Component class, 179 Menu class, 372 Container class, 211 MenuBar class, 378 Frame class, 229 MenuComponent class, 362 List component, 340 TextComponent class, 309 Menu class, 372 removeTextListener( ), 311 MenuBar class, 377 removeWindowListener( ), 226 MenuContainer interface, 364 repaint( ), 170 remove listener interfaces, 156 replaceItem( ), 340 removeActionListener( ) replaceRange( ), 322 Button class, 196 replaceText( ), 322 List component, 348 ReplicateScaleFilter( ), 468
  20. 1040 INDEX ReplicateScaleFilter class, 37, 467, 943 SELECTED constant, 145 requestFocus( ), 177 separator menu items, 371 requestTopDownLeftRightResend( ) setActionCommand( ) FilteredImageSource class, 425 Button component, 193 ImageProducer interface, 423 MenuItem class, 368 MemoryImageSource class, 427 setAlignment( ) resendTopDownLeftRight( ), 455 FlowLayout layout, 255 resetting images, 55 Label component, 191 reshape( ), 167 setAnimated( ), 427 resize( ) setBackground( ), 164 Applet class, 480 setBlockIncrement( ) Component class, 167 Adjustable interface, 401 resolution, monitor, 499 Scrollbar class, 390 resources for further reading, xx setBounds( ) resources, system (see performance) Component class, 167 RGB colors, 81, 83, 92, 415, 417 Rectangle class, 46 RGBImageFilter class, 462-465, 946 setCaretPosition( ), 307, 472 RGBtoGSB( ), 86 setCheckboxGroup( ), 351 RIGHT_ALIGNMENT constant, 163 setClip( ), 25 rounded corners, 29 setColFraction( ), 299 rowHeights[ ] variable, 274 setColor( ), 24 rows (see alignment) setColorModel( ) rowWeights[ ] variable, 274 ImageConsumer interface, 436 ImageFilter class, 454 S PixelGrabber class, 447 RGBImageFilter class, 463 sample programs, obtaining, xvii setColumns( ) SCALE_ hints, 53 GridLayout layout, 264 screen resolution, 499 TextArea class, 323 screen size, 499 TextField class, 313 SCROLL_ events, 391-393 setConstraints( ), 276 Scrollbar( ), 387 setContents( ), 508 SCROLLBARS_ constants, 402 setCurrent( ), 357 scrolling, 385-407 setCursor( ) Adjustable interface, 399-401, 553 Component class, 166 images (example), 393-399 Frame class, 229 with multiline text input, 319 setDimensions( ) Scrollbar class, 8, 386-393, 775 CropImageFilter class, 466 scrollbar color, 90 ImageConsumer interface, 436 ScrollbarPeer interface, 975 ImageFilter class, 454 scrolling events, 109, 391-393, 405 PixelGrabber class, 446 ScrollPane class, 770 ReplicateScaleFilter class, 468 ScrollPane container, 401-407 setDirectory( ), 243 ScrollPanePeer interface, 977 setEchoCharacter( ), 314 ScrollPane container, xiv, 8, 17 setEchoChar( ), 314 select( ) setEditable( ), 308 Choice component, 334 setEnabled( ) List component, 342 Container class, 177 TextComponent class, 307 MenuItem class, 367 selectAll( ), 307
Đồng bộ tài khoản