AWT

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » AWT 
OpenJDK: AWT
License:The GNU General Public License (GPL)
URL:https://openjdk.dev.java.net
Description:
Package NameComment
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images. A user interface object such as a button or a scrollbar is called, in AWT terminology, a component. The Component class is the root of all AWT components. See Component for a detailed description of properties that all AWT components share.

Some components fire events when a user interacts with the components. The AWTEvent class and its subclasses are used to represent the events that AWT components can fire. See AWTEvent for a description of the AWT event model.

A container is a component that can contain components and other containers. A con tainer can also have a layout manager that controls the visual placement of components in the container. The AWT package contains several layout manager classes and an interface for building your own layout manager. See Container and LayoutManager for more information.

Each {@code Component} object is limited in its maximum size and its location because the values are stored as an integer. Also, a platform may further restrict maximum size and location coordinates. The exact maximum values are dependent on the platform. There is no way to change these maximum values, either in Java code or in native code. These limitations also impose restrictions on component layout. If the bounds of a Component object exceed a platform limit, there is no way to properly arrange them within a Container object. The object's bounds are defined by any object's coordinate in combination with its size on a respective axis.

Additional Specification

@since JDK1.0
java.awt.color Provides classes for color spaces. It contains an implementation of a color space based on the International Color Consortium (ICC) Profile Format Specification, Version 3.4, August 15, 1997. It also contains color profiles based on the ICC Profile Format Specification. @since 1.2
java.awt.datatransfer Provides interfaces and classes for transferring data between and within applications. It defines the notion of a "transferable" object, which is an object capable of being transferred between or within applications. An object identifies itself as being transferable by implementing the Transferable interface.

It also provides a clipboard mechanism, which is an object that temporarily holds a transferable object that can be transferred between or within an application. The clipboard is typically used for copy and paste operations. Although it is possible to create a clipboard to use within an application, most applications will use the system clipboard to ensure the data can be transferred across applications running on the platform. @since JDK1.1

java.awt.dnd Drag and Drop is a direct manipulation gesture found in many Graphical User Interface systems that provides a mechanism to transfer information between two entities logically associated with presentation elements in the GUI. Normally driven by a physical gesture of a human user using an appropriate input device, Drag and Drop provides both a mechanism to enable continuous feedback regarding the possible outcome of any subsequent data transfer to the user during navigation over the presentation elements in the GUI, and the facilities to provide for any subsequent data negotiation and transfer.

This package defines the classes and interfaces necessary to perform Drag and Drop operations in Java. It defines classes for the drag-source and the drop-target, as well as events for transferring the data being dragged. This package also provides a means for giving visual feedback to the user throughout the duration of the Drag and Drop operation.

A typical Drag and Drop operation can be decomposed into the following states (not entirely sequentially):

  • A DragSource comes into existence, associated with some presentation element (Component) in the GUI, to initiate a Drag and Drop of some potentially Transferable data.

  • 1 or more DropTarget(s) come into/go out of existence, associated with presentation elements in the GUI (Components), potentially capable of consuming Transferable data types.

  • A DragGestureRecognizer is obtained from the DragSource and is associated with a Component in order to track and identify any Drag initiating gesture by the user over the Component.

  • A user makes a Drag gesture over the Component, which the registered DragGestureRecognizer detects, and notifies its DragGestureListener of.

    Note: Although this API consistently refers to the stimulus for a drag and drop operation being a physical gesture by a human user, this does not preclude a programmatically driven DnD operation given the appropriate implementation of a DragSource. This package contains the abstract class MouseDragGestureRecognizer for recognizing mouse device gestures. Other abstract subclasses may be provided by the platform to support other input devices or particular Component class semantics.

  • The DragGestureListener causes the DragSource to initiate the Drag and Drop operation on behalf of the user, perhaps animating the GUI Cursor and/or rendering an Image of the item(s) that are the subject of the operation.

  • As the user gestures navigate over Component(s) in the GUI with associated DropTarget(s), the DragSource receives notifications in order to provide "Drag Over" feedback effects, and the DropTarget(s) receive notifications in order to provide "Drag Under" feedback effects based upon the operation(s) supported and the data type(s) involved.

The gesture itself moves a logical cursor across the GUI hierarchy, intersecting the geometry of GUI Component(s), possibly resulting in the logical "Drag" cursor entering, crossing, and subsequently leaving Component(s) and associated DropTarget(s).

The DragSource object manifests "Drag Over" feedback to the user, in the typical case by animating the GUI Cursor associated with the logical cursor.

DropTarget objects manifest "Drag Under" feedback to the user, in the typical case, by rendering animations into their associated GUI Component(s) under the GUI Cursor.

The determination of the feedback effects, and the ultimate success or failure of the data transfer, should one occur, is parameterized as follows:

  • By the transfer "operation" selected by the user, and supported by both the DragSource and DropTarget: Copy, Move or Reference(link).

  • By the intersection of the set of data types provided by the DragSource and the set of data types comprehensible by the DropTarget.

  • When the user terminates the drag operation, normally resulting in a successful Drop, both the DragSource and DropTarget receive notifications that include, and result in the type negotiation and transfer of, the information associated with the DragSource via a Transferable object.
@since 1.2
java.awt.dnd.peer Provides for interfacing with the underlying window system in order to access its platform-dependent drag-and-drop facilities. This package is only used by AWT toolkit developers.

Package Specification

##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT #####

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
java.awt.event Provides interfaces and classes for dealing with different types of events fired by AWT components. See the java.awt.AWTEvent class for details on the AWT event model. Events are fired by event sources. An event listener registers with an event source to receive notifications about the events of a particular type. This package defines events and event listeners, as well as event listener adapters, which are convenience classes to make easier the process of writing event listeners. @since JDK1.1
java.awt.font Provides classes and interface relating to fonts. It contains support for representing Type 1, Type 1 Multiple Master fonts, OpenType fonts, and TrueType fonts. @since 1.2
java.awt.geom Provides the Java 2D classes for defining and performing operations on objects related to two-dimensional geometry. Some important features of the package include:
  • classes for manipulating geometry, such as AffineTransform and the PathIterator interface which is implemented by all Shape objects.
  • classes that implement the Shape interface, such as CubicCurve2D, Ellipse2D, Line2D, Rectangle2D, and GeneralShape.
  • the Area class which provides mechanisms for add (union), subtract, intersect, and exclusiveOR operations on other Shape objects.
@since 1.2
java.awt.im

Provides classes and interfaces for the input method framework. This package enables text editing components to receive text input through input methods. Input methods are software components that let the user enter text in ways other than simple typing on a keyboard. They are commonly used to enter Japanese, Chinese, or Korean - languages using thousands of different characters - on keyboards with far fewer keys. However, the framework also supports input methods for other languages and the use of entirely different input mechanisms, such as handwriting or speech recognition.

Package Specification

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:

@since 1.2
java.awt.im.spi Package java.awt.im.spi Description

Provides interfaces that enable the development of input methods that can be used with any Java runtime environment. Input methods are software components that let the user enter text in ways other than simple typing on a keyboard. They are commonly used to enter Japanese, Chinese, or Korean - languages using thousands of different characters - on keyboards with far fewer keys. However, this package also allows the development of input methods for other languages and the use of entirely different input mechanisms, such as handwriting recognition.

Package Specification

Packaging Input Methods

Input methods are packaged as installed extensions, as specified by the Extension Mechanism. The main JAR file of an input method must contain the file:

    META-INF/services/java.awt.im.spi.InputMethodDescriptor

The file should contain a list of fully-qualified class names, one per line, of classes implementing the java.awt.im.spi.InputMethodDescriptor interface. Space and tab characters surrounding each name, as well as blank lines, are ignored. The comment character is '#' (\u0023); on each line all characters following the first comment character are ignored. The file must be encoded in UTF-8.

For example, if the fully-qualified name of the class that implements java.awt.im.spi.InputMethodDesciptor for the Foo input method is com.sun.ime.FooInputMethodDescriptor, the file META-INF/services/java.awt.im.spi.InputMethodDescriptor contains a line:

    com.sun.ime.FooInputMethodDescriptor

The input method must also provide at least two classes: one class implementing the java.awt.im.spi.InputMethodDescriptor interface, one class implementing the java.awt.im.spi.InputMethod interface. The input method should separate the implementations for these interfaces, so that loading of the class implementing InputMethod can be deferred until actually needed.

Loading Input Methods

The input method framework will usually defer loading of input method classes until they are absolutely needed. It loads only the InputMethodDescriptor implementations during AWT initialization. It loads an InputMethod implementation when the input method has been selected.

Java Input Methods and Peered Text Components

The Java input method framework intends to support all combinations of input methods (host input methods and Java input methods) and components (peered and lightweight). However, because of limitations in the underlying platform, it may not always be possible to enable the communication between Java input methods and peered AWT components. Support for this specific combination is therefore platform dependent. In Sun's Java SE Runtime Environments, this combination is supported on Windows, but not on Solaris.

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:

@since JDK1.3
java.awt.image Provides classes for creating and modifying images. Images are processed using a streaming framework that involves an image producer, optional image filters, and an image consumer. This framework makes it possible to progressively render an image while it is being fetched and generated. Moreover, the framework allows an application to discard the storage used by an image and to regenerate it at any time. This package provides a number of image producers, consumers, and filters that you can configure for your image processing needs. @since JDK1.0
java.awt.image.renderable Provides classes and interfaces for producing rendering-independent images. @since 1.2
java.awt.peer Provides for interfacing with the underlying window system. It is for accessing the platform-specific facilities in order to build AWT toolkits. It is only used by AWT toolkit developers.

Package Specification

##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT #####

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
java.awt.print Provides classes and interfaces for a general printing API. The API includes such features as:
  • the ability to specify document types
  • mechanisms for control of page setup and page formats
  • the ability to manage job control dialogs
@since 1.2
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.