|PREV PACKAGE NEXT PACKAGE||FRAMES NO FRAMES|
|Focus2DTraversable||Components that want to participate in two-dimensional focus movement should implement this interface.|
|KMenuListener||Interface for receiving events about the state of the menu.|
|KOptionPane.ConfirmDialogListener||A listener that is notified when a confirmation dialog is closed.|
|KOptionPane.InputDialogListener||A listener that is notified when an input dialog is closed.|
|KOptionPane.MessageDialogListener||A listener that is notified when a message dialog is closed.|
|KProgress||Interface for components to display progress to the user about running activities.|
|KTextOptionMenu||Interface to option menus that can be displayed on the KTextOption panel.|
|OrientationController||Allows a Kindle Application to control the device's orientation.|
|AbstractFocus2DTraversalPolicy||Common implementation usable by most implementations of
|FocusTraversalEdgePolicy||Typesafe enumeration of possible types of actions a FocusTraversalPolicy may take when it reaches the "beginning" or "end" of a traversal chain.|
|FocusTraversalOrthogonalMode||Typesafe enumeration specifying focus traversal modes that describe how orthogonal alignments between components affect a focus traversal policy's behavior.|
|KBox||A simple container that uses
|KBox.Filler||A helper component which implements a simple component with fixed size requests.|
|KBoxLayout||An layout manager which arranges items into a sequence of boxes along either the x or y axis.|
|KButton||This class creates a labeled button, in the Kindle style.|
|KComponent||The base class for all UI components included in the KDK.|
|KImage||A component which displays an image.|
|KImage.Alignment||A type-safe class representing different image alignments.|
|KindleOrientation||Constants representing the possible orientations of the Kindle device.|
|KindletUIResources||Object that provides style properties for the current runtime/device.|
|KindletUIResources.KColorName||Typesafe enumeration of color names supported by the Kindle Development Kit.|
|KindletUIResources.KFontFamilyName||Typesafe enumeration of font family names supported by the kindle KDK.|
|KindletUIResources.KFontStyle||Typesafe enumeration of font styles supported by this interface's
|KLabel||Displays a single line text.|
|KMenu||A single level pull down menu deployed from the system title bar.|
|KMenuEvent||Event sent to
|KMenuItem||A menu item to be displayed in a menu.|
|KOptionPane||This class provides helper functions to display common modal dialog boxes.|
|KPagedContainer||A container for laying out components across a series of pages.|
|KPanel||A simple opaque area in which an application can attach other components using a supplied layout manager.|
|KRepaintManager||KRepaintManager provides applications with more precise control over the repaint logic.|
|KTextComponent||Common base class for Components that render text in some manner.|
|KTextOptionEvent||Event interface for text option events.|
|KTextOptionFontMenu||Standard font size option menu.|
|KTextOptionListMenu||A text option menu implementation that contains a title and a list of selectable items.|
|KTextOptionMenuItem||Option menu item that can be displayed on an KTextOptionListMenu.|
|KTextOptionMenuSelectable||Base class for text option menus that implement
|KTextOptionOrientationMenu||Standard orientation option menu.|
|KTextOptionPane||Option dialog invoked by the text button.|
|LogicalFocus2DTraversalPolicy||An implementation of
Provides the user interface components necessary to build a Kindle Application.
Standard documentation about AWT and Swing can be consulted for general guidelines when working with Java user interface design and implementation. For instance, most of the layout managers can be used in either Swing or AWT. Additionally, the user interface components have the same threading requirements and must only be manipulated from the dispatch thread. Keep in mind that the UI components provided by the KDK are different from those available in Java AWT and Swing and the differences must be taken into account when creating applications for the Kindle platform.
Unlike desktop development there are two specific areas that demand special attention on the Kindle platform: focus management and repaints. For convenience, the common cases for each have already been handled.
FocusTraversalPolicy, to determine how focus is moved inside an application. But by default, this is simply one-dimensional movement (forward and back). Focus moves between components in the order they were added to the container.
On the Kindle
the user moves the focus with a two dimensional navigation method - the five way. Two dimensional
focus movement is a considerably harder problem than one dimensional focus movement. By default,
each application's root container is preconfigured with a two-dimensional focus policy based
on the actual location of each component on the screen. For more details see
LayoutFocus2DTraversalPolicy. This heuristic works well for many
layouts, but sometimes developers need more control over traversal. To assist, a
LogicalFocus2DTraversalPolicy is also provided. This allows the
developer to supply a grid of valid focus transitions - similar to 2d focus order.
In extreme circumstance, applications may need to take control of focus movement explicitly. This
can be done manually using
Component.requestFocus() or new two-dimensional policies can be
created by extending
Developers of custom components should attempt to update the smallest region of the screen possible. When
Component.repaint(int, int, int, int) is requested the component will receive a paint request
that indicates the clip bound that is necessary to repaint.
KindletUIResources. The provided components are designed with these restrictions in mind.
For applications where update performance is important, it is recommended that developers avoid using all of the available grays on the device.
Component.repaint()provides. In particular, the Kindle's display also may leave a faint ghost of the previous screen image. While normally barely perceptible, over many updates an area can appear to have a "dirty" background. To address this issue, a special type of repaint is used that briefly inverts the display, or flashes it. To issue a full refresh, or flashing repaint, see
Additionally developers may wish to track dirty regions manually and paint them.
KRepaintManager provides support for this.
Developers should start by using the standard repaint mechanisms in AWT and only move to the repaint manager
Fontare used. To ensure that the colors and fonts specified are available on the device, application's should use
KindletUIResourcesto obtain the specific Color and Font instances. This is particularly important for fonts, where this is the only reliable way to obtain aliased vs. anti-aliased font rendering.
|PREV PACKAGE NEXT PACKAGE||FRAMES NO FRAMES|
(C) 1996-2010 Amazon.com, Inc. and its affiliates.