Graphic Java™ 1.2, Volume I: AWT, Third Edition

Book description


7966F-4

Graphic Java 2 is the most comprehensive guide to the Java Foundation Classes (JFC) available. Three volumes cover all aspects of the JFC providing java developers with the skills needed to build professional, cross platform applications that take full advantage of the Java Foundation Classes.

The AWT is the cornerstone of the Java Foundation Classes. Volume 1 provides detailed descriptions of every aspect of the AWT, including:

  • Event Handling

  • Layout Managers

  • Graphics, Colors & Fonts

  • Image Manipulation

  • Lightweight Components

  • Data Transfer & Drag and Drop

  • Double Buffering

  • Sprite Animation

  • Java expert David Geary provides clear and in-depth explanations of both fundamental and advanced AWT concepts. The layout manager chapter, for example, is over 100 pages long and includes what readers have called the best explanation of GridBagLayout on the planet. A GridBagLab application on the CD lets you explore GridBagLayout on your own.

    The accompanying CD-ROM includes all of the example code from the book, ready to run on Solaris(tm), Windows 95, Windows NT, and Macintosh along with the JDK(tm) for those platforms.

    Table of contents

    1. Copyright
    2. Preface
    3. Acknowledgments
    4. Introduction: The Java Foundation Classes, The AWT, Applets, and Applications
      1. Introduction
        1. The Java Foundation Classes
        2. The Abstract Window Toolkit
        3. Peers and Platform Independence
        4. Components—The Foundation of the AWT
        5. Components, Containers, and Layout Managers
        6. Summary
      2. Applets and Applications
        1. Java Applets
        2. Java Applications
        3. Combining Applet and Application Code
        4. Summary
    5. Graphics and Images
      1. Graphics
        1. java.awt.Graphics
        2. Graphics Parameters
        3. The Graphics Coordinate System
        4. Graphics References
        5. More on Drawing and Filling Shapes
        6. Translating a Coordinate System's Origin
        7. Clipping
        8. Graphics Modes
        9. Creating a Graphics
        10. Summary
      2. Colors and Fonts
        1. Color Models
        2. The java.awt.Color Class
        3. System Colors
        4. Fonts and FontMetrics
        5. Summary
      3. Loading and Displaying Images
        1. The Image Class and the Image Package
        2. Image Producers and Image Observers
        3. Loading and Displaying Images
        4. Differences Between Applets and Applications
        5. Waiting for an Image to Load
        6. Painting Images a Scanline at a Time
        7. MediaTracker
        8. Animated GIFS
        9. AWT Components as Image Observers
        10. Creating Images
        11. Loading Images as Resources
        12. Summary
      4. Image Filtering
        1. The ImageProducer Interface
        2. The ImageConsumer Interface
        3. How Image Producers and Image Consumers Interact
        4. AWT Image Filters
        5. ImageConsumer Properties
        6. Implementing Custom Image Filters
        7. Extending RGBImageFilter
        8. Extending ImageFilter
        9. Implementing the ImageConsumer Interface
        10. An Introduction to Double Buffering
        11. Summary
      5. Image Manipulation Without Filtering
        1. Scaling and Flipping Images
        2. Grabbing Pixels
        3. Memory Image Source
        4. Summary
    6. Events and Layout Management
      1. Inheritance-Based Event Handling (AWT 1.02 and Before)
        1. The Original AWT Event Model
        2. Event Modifier Constants
        3. Mouse Button Events
        4. Of Mice and Buttons
        5. Monitoring Mouse Events
        6. Sensing Double Clicking
        7. Action Events
        8. Identifying Components by Label — Just Say No
        9. Shortcomings of the Inheritance-Based Event Model
        10. Summary
      2. The Delegation Event Model (AWT 1.1 and Beyond)
        1. The Delegation Event Model
        2. The Big Picture
        3. AWT Adapters
        4. Component Events
        5. Semantic Events
        6. Event Adapters
        7. Inner Classes
        8. Firing AWT Events from Custom Components
        9. Firing Custom Events from Custom Components
        10. Dispatching Events and the AWT Event Queue
        11. Active Events
        12. Inheritance-Based Mechanism
        13. Event Handling Design
        14. Summary
      3. Components, Containers, and Layout Managers
        1. The Big Three of the AWT
        2. LayoutManagers
        3. Painting a Container's Components
        4. Forcing a Container to Lay Out Its Components
        5. Standard AWT Layout Managers
        6. The GridBagLayout Layout Manager
        7. Null Layout Managers
        8. Custom Layout Managers
        9. Summary
    7. AWT Components
      1. The AWT Component Class
        1. Components
        2. java.awt.Component
        3. Component Properties
        4. Deprecated Methods
        5. Component Location, Bounds, and Coordinates
        6. Component Preferred, Minimum, and Maximum Sizes
        7. Component Visibility and Responsiveness
        8. Components and Peers
        9. Rendering Components
        10. Components and Zorder
        11. Components and Cursors
        12. Components and Serialization
        13. Components and Internationalization
        14. Components and JavaBeans
        15. Components and Tree Locking
        16. Summary
      2. Basic Components: Labels, Buttons, Canvases, and Panels
        1. Labels and Buttons
        2. Canvases and Panels
        3. Summary
      3. Item Selectables: Checkboxes, Choices, and Lists
        1. The java.awt.ItemSelectable Interface
        2. java.awt.Checkbox
        3. Non-Mutually Exclusive Groups of Checkboxes
        4. Mutually Exclusive Groups of Checkboxes
        5. Choices and Lists
        6. Summary
      4. Text Components
        1. java.awt.TextComponent
        2. java.awt.TextField
        3. java.awt.TextArea
        4. Summary
      5. Scrolling: Scrollbars and Scrollpanes
        1. java.awt.Scrollbar
        2. java.awt.ScrollPane
        3. Summary
      6. Windows, Frames, and Dialogs
        1. java.awt.Window
        2. java.awt.Frame
        3. java.awt.Dialog
        4. Summary
      7. Menus
        1. The Menu Classes
        2. A File Menu
        3. Handling Menu Events
        4. Tear-off Menus
        5. A MenuBar Printer
        6. A FrameWithMenuBar Class
        7. Help Menus
        8. Checkbox Menu Items
        9. Cascading Menus
        10. Dynamically Modifying Menus
        11. Popup Menus
        12. Summary
      8. Mouseless Operation and Printing
        1. Mouseless Operation
        2. Keyboard Traversal
        3. Menu Shortcuts
        4. Printing
        5. Summary
      9. Lightweight Components
        1. Introducing Lightweight Components
        2. A Simple Lightweight Component
        3. Lightweight Containers
        4. Lightweight Components and Zorder
        5. Lightweights and Their Graphics
        6. Lightweights and Preferred Sizes
        7. Summary
    8. Advanced Topics
      1. Clipboard and Data Transfer
        1. The java.awt.datatransfer Package
        2. The Clipboard Class
        3. The System Clipboard
        4. Local Clipboards
        5. Data Transfer Mechanism
        6. Copying Images to a Clipboard
        7. Transferring Custom AWT Components
        8. Summary
      2. Drag and Drop
        1. The java.awt.dnd Package
        2. Drag Sources and Drop Targets
        3. Summary
      3. Custom Dialogs
        1. The Dialog Classes
        2. WorkDialog
        3. ButtonPanel
        4. Postcard
        5. MessageDialog
        6. YesNoDialog
        7. QuestionDialog
        8. Summary
      4. Rubberbanding
        1. The Rubberband Classes
        2. The Rubberband Base Class
        3. A Rubberband Panel
        4. Exercising the Rubberband Classes
        5. Refactoring the Unit Test
        6. Summary
      5. Double Buffering
        1. Double Buffering and Animation
        2. How Double Buffering Works
        3. Draggable Lightweights and a Double Buffered Container
        4. Summary
      6. Sprite Animation
        1. The Participants
        2. Sequences and Sprites
        3. Playfield and DoubleBufferedContainer
        4. Collision Detection
        5. Exercising the Animation Package
        6. Summary
      7. AWT Class Diagrams
        1. Legend
        2. A Look at an Example Class Diagram

    Product information

    • Title: Graphic Java™ 1.2, Volume I: AWT, Third Edition
    • Author(s): David M. Geary
    • Release date: September 1998
    • Publisher(s): Pearson
    • ISBN: 9780130796660